Produced by IDL 7.1.1
User Documentation

./toolbox
dcbaseline.pro

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

dcbaseline

function dcbaseline(dc, nfit, regions, nregion, polyfit, polyrms)

Fit a baseline to the contents of the dc argument with various options.

This fits a set of orthogonal polynomials with a maximum order given by the nfit argument to the data values in dc. The range of channels to use is given by the regions and nregion arguments. The parameters of the fit are placed in the value of the polyfit argument and the rms values of the fits are placed in the polyrms argument. If there is a problem, the return value is 0, otherwise the return value is 1.

Returns
1 on success, 0 on failure.
Examples
   ok = dcbaseline(!g.s[0], 2, !g.regions, !g.nregion, polyfit, polyrms)
 
Uses
data_valid get_chans ortho_fit
Version
$Id$

Parameters
dc
in, required
data container
The data container to use. The values to fit come from *dc.data_ptr.
nfit
in, required
integer
The order of polynomial to fit.
regions
in, required
2D array
Array describing the regions to use in the fit, along with nregion. This has the same properties as the !g.region field in the guide structure.
nregion
in, required
integer
The number of regions in regions to actually use.
polyfit
out
variable
Parameters describing the polynomials. Array with (nfit+1) elements. See ortho_fit for more details.
polyrms
out
variable
RMS values, one for each polynomial (nfit+1).


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