IRAF help page for package noao.twodspec.multispec, program fitgauss5

from NOAO fitgauss5 -- Fit spectra profiles with five parameter Gaussian modelUSAGEPARAMETERSDESCRIPTIONEXAMPLESSEE ALSO

fitgauss5 -- Fit spectra profiles with five parameter Gaussian model


USAGE

fitgauss5 image start


PARAMETERS

image

Image to be modeled.

start

Starting sample line containing the initial model parameters.

lower = -10

Lower limit for the profile fit relative to each spectrum position.

upper = 10

Upper limit for the profile fit relative to each spectrum position.

lines = *

Sample image lines to be fit.

spectra = *

Spectra to be fit.

naverage = 20

Number of data lines to be averaged about each sample image line before model fitting.

factor = 0.05

The model fit to each line is iterated until the RMS error between the model line and the data line improves by less than this factor.

track = yes

Track the model solution from the starting line to the other sample lines?

algorithm = 1

Parameter fitting algorithm to use. Legal values are 1 and 2.

fit_i0 = yes

Fit the profile scale parameters i0?

fit_x0 = yes

Fit the spectra position parameters x0?

fit_s0 = yes

Fit the spectra shape parameters s0?

fit_s1 = no

Fit the spectra shape parameters s1?

fit_s2 = no

Fit the spectra shape parameters s2?

smooth_s0 = yes

Fit a smoothing spline to the shape parameters s0 after each iteration?

smooth_s1 = yes

Fit a smoothing spline to the shape parameters s1 after each iteration?

smooth_s2 = yes

Fit a smoothing spline to the shape parameters s2 after each iteration?

spline_order = 4

Order of the smoothing spline to be fit to the shape parameters.

spline_pieces = 3

Number of polynomial pieces for the smoothing spline.

verbose = no

Print general information about the progress of the model fitting.


DESCRIPTION

The spectra profiles in the interval (lower, upper) about each spectrum position are fit with a five parameter Gaussian model for the specified sample lines of the image. For a description of the model see gauss5. The model fitting is performed using simultaneous linearized least squares on the selected model profile parameters as determined by the algorithm for the specified spectra. The parameter fitting technique computes correction vectors for the parameters until the RMS error of the model image line to the data image line, which is an average of naverage lines about the sample line, improves by less than factor. A solution which increases the RMS error of the model is not allowed.

If the parameter track is yes then the initial model parameters are those given in the database for the sample line start_line. From this starting point the model parameters are iterated to a best fit at each specified sample line and then the best fit is used as the starting point at the next line. The tracking sequence is from the starting line to the last line and then, starting again from the starting line, to the first line. Note that the model parameters, including the starting spectra positions, need be set only at the starting line.

If track is no then each specified sample line is fitted independently from the initial model parameters previously set for that line. This option is used to add additional parameters to the model after an initial solution has been obtained or to refit a new image whose database was created as a copy of the database of a previously fit image.

The shape parameters s0, s1, and s2 can be smoothed by fitting a spline of specified order and number of spline pieces, npp to the parameters as a function of spectra position. The smoothing is performed after each iteration and before computing the next RMS error. The smoothing is a form of local constraint to keep neighboring spectra from having greatly different shapes. The possibility of such erroneous solutions being obtained is present in very blended data.

In verbose mode the RMS errors of each iteration are printed on the standard output.

The selection of the parameters to be fit and the order in which they are fit is determined by algorithm. These algorithms are:

4 1

This algorithm fits the selected parameters (fit_i0, fit_x0, fit_s0, fit_s1, fit_s2) for the selected spectra simultaneously.

4 2

This algorithm begins by fitting the parameters i0, x0, and s0 simultaneously. Note that the values of s1 and s2 are used but are kept fixed. Next the parameters s0 and s1 (the shape) are fit simultaneously keeping i0, x0, and s2 fixed followed by fitting i0 and x0 while keeping s0, s1, and s2 (the shape) fixed. If either of these fits fails to improve the RMS then the algorithm terminates. Also, if after the two steps (the fit of s0 and s1 followed by the fit of i0 and x0), the RMS of the fit has not improved by more than the user specified factor the algorithm also terminates. This algorithm has been found to be the best way to fit highly blended spectra.


EXAMPLES

The default action is to fit Gaussian profiles to the spectra and trace the fit from the starting line. An example of this is:

cl> fitgauss5 image 1

To fit heavily blended spectra with the four parameter model (i0, x0, s0, s1):

cl> fitgauss5 image 1 algorithm=2


SEE ALSO

findspectra,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu