Produced by IDL 6.1
User Documentation

./guide
File baseline.pro

Last modification date:
Tue Dec 7 22:50:36 2004


baseline

procedure baseline, [nfit=integer], [modelindex=integer], [/nofit]

Fit and subtract a baseline from the contents of data container [0] (continuum or line, depending on the GUIDE mode at the time).

See the notes for bshape for more details since this procedure uses that one for much of its work.

Examples
Get some data, set some regions, fit a 2nd order polynomial, putting the model (fitted baseline) into !g.s[10].
 get,index=20
 nregion,[100,500,700,1000,1600,2000]
 !g.nfit=2
 baseline,modelindex=10
 
The step involving !g.nfit can be omitted with the same result.
 baseline,nfit=2,modelindex=10
 
Same fit, but first show it via overplot and then subtract without refitting it.
 bshape, nfit=2, modelindex=10
 baseline,/nofit,modelindex=10
 
Same fit, but don't put the model into any of the data containers.
 bshape,nfit=2
 baseline,/nofit
 
Uses
data_valid bshape ortho_poly
Version
$Id: baseline.pro,v 1.1 2004/12/08 03:50:36 bgarwood Exp $ -

Keywords
nfit
in, optional
integer
The order of polynomial to fit. Defaults to !g.nfit. If set, then this also sets the value of !g.nfit.
modelindex
in, optional
integer
The index number to hold the fit evaluated at all channels (the model). If not set, this defaults to -1. If set to -1, then no index will hold the model after this procedure is used. If nofit is set and modelindex is -1, then the model used is generated from the parameters, otherwise the modelindex is used (and there is no way to check that modelindex is a valid baseline model). This also determines how the baseline that is subtracted is determined (from a model at modelindex or from the most recently fit parameters).
nofit
in, optional
boolean
If set, no fit is made, instead, the contents of the [modelindex] data container or !g.polyfit are used to generate the baseline to be subtracted.


Produced by IDLdoc 1.5 on Wed Dec 8 13:08:14 2004