|
User Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./guide bshape.pro
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.
; 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
Keywords | |
nfit |
The order of polynomial to fit. Defaults to !g.nfit. If set, then this also sets the value of !g.nfit. |
noshow |
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 |
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 |
This is set to 1 on success and 0 on failure. |
color |
The color to use when overplotting the baseline fit. This defaults to the same default used by gbtoplot |