|
Developer Documentation |
|||||||||
| prev file | next file | ||||||||||
| SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox ortho_fit.pro
| ortho_fit |
Function uses general orthogonal polynomial to do least squares fitting.
This code came from Tom Bania's GBT_IDL work. Local modifications include:
yy = *(!g.s[0].data_ptr)
xx = dindgen(n_elements(yy))
f = ortho_fit(xx, yy, 3, cfit, rms)
| Parameters | |
|
xx |
The x-values to use in the fit. |
|
yy |
The data to be fit at xx. |
|
nfit |
The order of the polynomial to fit. |
|
cfit |
On return, cfit has coefficients of
the polynomial
fit = sum(m) a_m x^mbecause of round-off using this form gives unreliable results above about order 15 even for double precision. See ortho_poly for a better discussion on the contents of cfit. |
|
rms |
The rms error for each polynomial up to order nfit. |