Produced by IDL 6.1
User Documentation

./guide
bshape.pro

Last modification date:
Thu Jun 2 23:56:08 2005

bshape

procedure bshape, [nfit=integer], [/noshow], [modelindex=integer], [/ok], [color=color]

Fit a polynomial baseline from the contents of the primary data container [0] (continuum or line, depending on the GUIDE mode at the time) and optionally overplots that fit on top of the current plot.

This fits a set of orthogonal polynomials with a maximum order given by the !g.nfit value to the data values in the [0] data container. The range of channels to use is given by !g.regions and !g.nregion. The parameters of the fit are placed in to !g.polyfit and the polynomial is evaluated over all channels and that result is placed into the container at modelindex (see the comments for that keyword for more details), which is otherwise a copy of the header information in data container 0.

Examples
 ; fit, using the value of !g.nfit
 !g.nfit=3
 bshape
 ; Or specify an nfit here
 bshape,nfit=3
 ; You've done several bshapes and want to see just the most recent
 show
 bshape,/nofit
 
Uses
dcbaseline getbasemodel data_valid bmodel
Version
$Id: bshape.pro,v 1.7 2005/06/02 17:09:44 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.
noshow
in, optional
boolean
If set, the result is not shown (overplotted). If the plotter is frozen, then nothing is overplotted even if this keyword is not set.
modelindex
in, optional
integer
The index number to hold the fit evaluated at all channels (the model). If not set then no index will hold the model after this procedure is used.
ok
in, optional
boolean
This is set to 1 on success and 0 on failure.
color
in, optional
color
The color to use when overplotting the baseline fit. This defaults to the same default used by gbtoplot


Produced by IDLdoc 1.6 on Thu Jun 2 23:56:46 2005