Produced by IDL 7.1.1
User Documentation

./guide
baseline.pro

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

baseline

procedure baseline, [nfit=integer], [modelbuffer=integer], [ok=variable]

Fit and subtract a polynomial baseline. The procedure works on the contents of buffer 0 (the primary data container). Both continuum and line data are supported.

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

Use bshape if you want to fit the baseline and (usually) show the fit on the plotter without actually subtracting the fit from the data.

Use bsubtract to subtract a baseline using the baseline coefficients stored previously in the !g structure. Coefficients are stored in !g, for example, by running bshape.

Use bmodel to generate a baseline model from the coefficients and store it in the buffer specified in modelbuffer.

Use bshow to overplot a baseline model.

Use subtract to subtract the data of one buffer (which might contain a baseline model) from another.

Examples
; Get some data, set some regions, fit and subtract a 2nd order ; polynomial, storing the model (fitted baseline) into buffer 10.
    getrec,20
    nregion,[100,500,700,1000,1600,2000]
    nfit,2
    baseline,modelbuffer=10
 
; The step involving nfit can be omitted as follows:
    baseline,nfit=2,modelbuffer=10
 
; Examine a fit first, then subtract it.
    getnod, 10  ; first get some data
    setregion   ; set the baseline region with the cursor
    nfit, 5
    bshape
    baseline
 
Uses
bshape bsubtract
Version
$Id$

Keywords
nfit
in, optional
integer
The order of the polynomial to fit. Defaults to the value stored in !g.nfit, which can be set by the nfit procedure or, if nfit is set here, then the value of !g.nfit is set too.
modelbuffer
in, optional
integer
The buffer number to hold the evaluated fit (the model).
ok
out, optional
variable
1 on success, 0 on failure.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:33 2016