Produced by IDL 7.1.1
User Documentation

./guide
bshape.pro

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

bshape

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

Fit a polynomial baseline to the contents of the primary data container (the PDC, buffer 0) and optionally overplot that fit on to 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 primary 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. That evaluation is placed into the data container at modelbuffer (see the comments for that keyword for more details), which is otherwise a copy of the header information in global buffer 0.

Examples
 ; fit, using the value of !g.nfit, set using nfit
 nfit,3
 bshape
 ; Or specify an nfit here, keeping the fit in buffer 10
 bshape,nfit=3, modelbuffer=10
 
Uses
dcbaseline getbasemodel data_valid bmodel
Version
$Id$

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.
modelbuffer
in, optional
integer
The buffer number to hold the fit evaluated at all channels (the model). If not set then no global buffer will hold the model after this procedure is used.
ok
out, optional
variable
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 Wed Sep 28 13:27:33 2016