|
User Documentation |
|||||||||
| prev file | next file | ||||||||||
| SUMMARY: fields | routine DETAILS: routine | ||||||||||
./guide gauss.pro
| 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.
; 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
| Parameters | |
|
fit |
results of fit. identical to !g.gauss.fit |
|
fitrms |
errors of fit. identical to !g.gauss.fitrms |