Produced by IDL 7.1.1
User Documentation

./guide
gauss.pro

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

gauss

procedure gauss[, fit][, fitrms], [buffer=long], [modelbuffer=long], [ok=variable], [/quiet]

Fits Gaussians to the data in the primary data container (!g.s[0]) based on initial values that can be set by procedures gregion, ngauss, gmaxiter, and gparamvalues.

Other data containers can be fit using the buffer keyword.

Multiple gaussians in multiple regions can be fit at the same time.

The initial guesses and the most recent fit are available in the !g.gauss structure.

Examples
Typically, fitgauss will be used to set the initial guesses and do the fit, using gauss. Internally, fitgauss does these steps.
    ; using the user-identified points, set the region(s)
    gregion,[4120,4400]   ; channels 4120 through 4400 inclusive
    ngauss,2              ; fit 2 gaussians
    ; for each gaussian, do this
    gparamvalues, 0, [2.4, 4359.0, 12.3]  ; [height, center, fwhm]
    gparamvalues, 1, [0.5, 4370.0, 9.2] 
    gauss
    gshow
 

Continuum data containers can also be fit (must be in continuum mode).

    cont                ; switch to cont mode
    filein,'peaks.fits'
    get,buffer=1        ; get some data
    ; setup the gauss fit
    gregion,[60,80]
    ngauss,1
    gmaxiter,500
    gparamvalues, 0, [400000.,70.,100.]
    ; find and show the fit
    gauss
    gshow
 
Uses
gauss_fits report_gauss
Version
$Id$

Parameters
fit
out, optional
variable
results of fit. identical to !g.gauss.fit
fitrms
out, optional
variable
errors of fit. identical to !g.gauss.fitrms

Keywords
buffer
in, optional
long (def. 0)
global buffer number whose data is to be fit. Defaults to the primary data container.
modelbuffer
in, optional
long (def. -1)
buffer number to hold the resulting model. If not set (the default) then no global buffer is filled with the model.
ok
out, optional
variable
result; 1 - good, 0 - bad
quiet
in, optional
boolean (def. F)
When set, no report of the fits and initial guesses is printed.


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