|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox dcbaseline.pro
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.
ok = dcbaseline(!g.s[0], 2, !g.regions, !g.nregion, polyfit, polyrms)
Parameters | |
dc |
The data container to use. The values to fit come from *dc.data_ptr. |
nfit |
The order of polynomial to fit. |
regions |
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 |
The number of regions in regions to actually use. |
polyfit |
Parameters describing the polynomials. Array with (nfit+1) elements. See ortho_fit for more details. |
polyrms |
RMS values, one for each polynomial (nfit+1). |