Produced by IDL 7.1.1
User Documentation

./toolbox
ortho_poly.pro

Last modification date:
Wed Sep 28 13:27:11 2016

ortho_poly

function ortho_poly(x, polyfit)

function returns the sum of the set of orthogonal polynomials described by the polyfit argument evaluated at x.;

This code came from Tom Bania's GBT_IDL work. Local modifications include:

Returns
Array giving the evaluated polyfit at x.
Examples
Fit a 7-th order polynomial to the data in !g.s[0] and subtract the result of the fit from that data, replacing the data in !g.s[0].
    yy = *(!g.s[0].data_ptr)
    xx = dindgen(n_elements(yy))
    poly = ortho_fit(xx, yy, 7, cfit, rms)
    thefit = ortho_poly(xx,poly)
    *(!g.s[0].data_ptr) = *(!g.s[0].data_ptr) - thefit
 
Version
$Id$

Parameters
x
in, required
The x-values to use in evaluating the polynomials.
polyfit
in, required
2D array
The array describing the polynomials. Typically this will be the return value from ortho_fit. The dimensionality is [4,(nfit+1)]
  • polyfit(3,m) gives the weighting coefficient for the m-th orthogonal polynomial
  • polyfit(0:2,m) for m=2 are the recursion coefficients for
     
     p^(m) = x*p^(m-1)*polyfit(2,m) + p^(m-1)*polyfit(1,m) + p^(m-2)*polyfit(0,m) 
     
  • polyfit(0,0) is the value of the constant term
     p^(1) = polyfit(1,1)*x + polyfit(0,1)
     


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:39 2016