Title: Scaling%20a%20profile%20to%20fit%20data
1Example
?
2Scaling a profile to fit data
- Using the notation weve just learned,
- So what basis vectors correspond to
? - Answer
- i.e. ?i is the unit of distance on the ith axis
of data space!
3Length scales
- In the orthogonal system we used for profile
fitting - Dot product of 2 basis vectors
- i.e. the basis vectors are orthogonal, but not
unit length. - Need to stretch axis i by factor ?i and define
new basis vectors b
4?? ellipses become circles
- Old basis vectors
- Stretched basis vectors
b2
?? contours are circles
x2 /?2
x
b1
b2
b1
x1 /?1
5Example primordial helium abundance
- Fitting a line to data with error bars in both X
and Y - If ?x??y, get misleading point of closest
approach - Horizontal stretch by factor ?y/?x
?x
yaxb
?
R
?y
6Defining ?? with errors in both X and Y
- Hence determine minimum distance R
- Hence
7Constructing orthogonal basis functions
- First way diagonalize Hessian matrix.
- Quadratic approximation to ?? surface
- Orthogonal basis vectors are the eigenvectors of
Hij along the principal axes of the ?? contours. - Sometimes called Principal Component Analysis
(PCA), also related to singular-value
decomposition (see Press et al).
8Gram-Schmidt Orthogonalization 1
- Second way the Gram-Schmidt process.
- 1. Start with N vectors Vi , i1,...N. They must
be independent, i.e. no two of them parallel. - 2. Normalize vector 1
- 3. Make v2 perpendicular to e1
- i.e. subtract component of v2 in direction of e1
- 4. Normalize v2
v2
e1
e2
9Gram-Schmidt Orthogonalization 2
- 5. Make v3 perpendicular to e1
- 6. Make v3 perpendicular to e2
- Note v3 is perpendicular to e1 AND e2.
- 7. Normalize v3
- ...and so on, making v4 perpendicular to e1, e2,
e3 and normalising to get e4 - Repeat for all vectors up to vN to get
ortho-normal basis e1, e2, ..., eN
10Differences between successive ?? fits
- Fit A B x C x2
- A, B, C are not independent
- 1, x, x2 are not orthogonal
- If Pk(x) is a polynomial of degree k fitted to
the data, then fit - AP0(x) BP1(x) - P0(x) C P2(x) - P1(x)
- A, B, C are independent
- the functions Pk(x) - Pk-1(x) are orthogonal
11Periodic signals
- To search a time series of data for a sinusoidal
oscillation of unknown frequency ? - Fold data on trial period P?????
- Fit a function of the form
Programming hint Use phiatan2(S,C) if you care
about which quadrant ? ends up in!
Correct ?? good ??, large A
S
Phase
0
1
C
12Periodograms
- Repeat for a large number of ? values
- Plot A(?) vs ? to get a periodogram
A(?)
?
13Fitting a sinusoid to data
- Data ti, xi ?i, i1,...N
- Model
- Parameters X0, C, S, ?
- Model is linear in X0, C, S and nonlinear in ?
- Use an iterative ?? fit to linear parameters at a
sequence of fixed trial ?.
14- Iterate to convergence
- Error bars