Produced by IDL 7.1.1
Developer Documentation

./guide
fitgauss.pro

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

Routine Summary  3 routines

procedure fitgauss[, fit][, fitrms], [modelbuffer=long], [highlightcolor=color]

An interactive procedure that allows the user to fit gaussians.

procedure find_region, nregions, regions, x, region

private

Used internally in fitgauss, finds the region index number in regions where x can be found.

procedure overlap_check, nregions, regions, checkpoint, status

private

Check to see if two regions overlap.

Routine Details

fitgauss

procedure fitgauss[, fit][, fitrms], [modelbuffer=long], [highlightcolor=color]

An interactive procedure that allows the user to fit gaussians. The user should first subtract a baseline from the data prior to using this procedure. Next, use the plotter zoom feature to narrow in on the region of interest. Then run fitgauss. Click the left mouse button to mark the regions to be considered in the fit. Then click the middle mouse button, twice for each gaussian to be fit, first at the (guessed) peak of the line, and then at the half-power point. Repeat the middle mouse clicks as many times as you like to fit multiple components. Finally click the right mouse button to actually do the fit and display the results.

Each guassian (middle mouse clicks) must be found in an already set region (left mouse button). Use the right mouse button to exit at any time (will require 2 right clicks to quit the procedure in the middle of a step - marking a region or identifying a gaussian).

Examples
   fitgauss,modelbuffer=10   ; fit gaussian and store model in buffer 10
   show
   subtract,0,10,11          ; store residual in buffer 11
   oshow, 11                 ; overlay residual
   oshow, 10, color=!yellow  ; overlay gaussian model
 
Version
$Id$

Parameters
fit
out, optional
variable
An output array giving the results of the fit. Also stored in !g.gauss.fit.
fitrms
out, optional
variable
An output array giving the uncertainties of the fit. Also stored in !g.gauss.fitrms.

Keywords
modelbuffer
in, optional
long (def. -1)
The buffer number to hold the resulting model. If not set (the default) then the model is not saved to a global buffer.
highlightcolor
in, optional
color (def. !g.highlightcolor)
The color to use after the region of interest has been selected to highlight the data.

find_region private

procedure find_region, nregions, regions, x, region

Used internally in fitgauss, finds the region index number in regions where x can be found.

Parameters
nregions
in, required
integer
The number of regions that exist in regions.
regions
in, required
array
The regions to check.
x
in, required
scalar
The value to check to see what region it falls in.
region
out, required
variable
The region number where x is found. Set to -1 if no region found.

overlap_check private

procedure overlap_check, nregions, regions, checkpoint, status

Check to see if two regions overlap. Used internally only.

Parameters
nregions
in, required
integer
The number of regions.
regions
in, required
array
The regions to check
checkpoint
in, required
scalar
The point to check.
status
out, required
variable
The status of the check.


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