Produced by IDL 7.1.1
User Documentation

./guide
bmodel.pro

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

bmodel

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

Fill in the indicated data container at modelbuffer using the primary data container and the most recently fit parameters in !g.polyfit and !g.nfit. Optionally use a smaller nfit than !g.nfit.

Note that bmodel does not do any fitting. Use baseline or bshape to generate a new fit.

Since orthogonal polynomials are used internally, using up to any nfit less than or equal to the value of nfit used when the polynomials was generated is itself the fit that would have resulted had that smaller nfit been used in the first place. In this way, bmodel can be used to generate the model fit for any value of nfit up to the nfit actually used to generate the most recently fit polynomial.

Examples
 ; put the model in !g.s[1]
 bmodel
 ; put the model in !g.s[10], using nfit=5
 nfit,5
 bmodel, modelbuffer=10
 ; put the model with nfit=2 into buffer 11
 bmodel modelbuffer=11, nfit=2
 
Uses
data_valid getbasemodel
Version
$Id$

Keywords
modelbuffer
in, optional
integer (def. 1)
The buffer number of the data container to use to hold the model. Defaults to 1 if not supplied.
nfit
in, optional
integer
Only use at most nfit parameters. If !g.nfit is less then nfit, then only !g.nfit parameters will be used and a warning will be issued.
ok
out, optional
variable
1 on success, 0 on failure.


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