next up previous 174
Next: The Stack
Up: Getting To Know Your Baselines
Previous: Polynomial baselines

Gaussian models

Gaussian fitting is done in a similar way. The only difference is that here you need to specify the line region, rather than outside it. You will be asked for initial guesses for the amplitude, width and position of each gaussian you want to fit. A helpful hint here is to make use of the ability of SPECX to write output (such as Guassian fit parameters) to a file. To do this type

$>\!>$ s-l-f f file-name

where file-name is your choice of file to which to write the information. Remember to reset the output to your screen subsequently (use s-l-f t).

The key commands here are fit-gaussian-model and calculate-gaussian-model, f-g-m and c-g-m respectively.

In non-interactive mode, the dialog might proceed as follows:

>> f-g-m

          1 baseline regions currently defined
Type intervals, one at a time, EOF to finish
Current units are km/s

# [  -30.15,   10.02] -30 15
#  Exit

Estimates of Amp.,Width(FWHM) and Pos'n for each line
Line at a time, EOF to finish

Current units are km/s

Line  1: [  -2.4  8.7    -7.0] -2.2 9. -8
Line  2: -0.3 25 -8
Line  3:  Exit

         No of Iterations =     4          Final SUMSQ = 0.1725E+01

                  Parameters of current gaussian model

                 N       Amp.        Width (km/s)    Pos'n (km/s)
                 1     -2.152           7.66            -7.04
                 2     -0.277          22.02            -4.64

Baseline calculated - Pushed into stack
..

>> c-g-m
Unknown velocity frame: R
Line or range of lines to model? (EOF to finish) [ 1, 1] 1,2
Line or range of lines to model? (EOF to finish) [ 1, 2]  Exit

What happened here was I used f-g-m to fit the velocity range surrounding with two Guassian components as specified. Then I used c-g-m to calculate the curve corresponding to these components (which is placed at the top of the stack) and then plotted it on the same axes as for the spectrum. The result of this is shown in Figure [*].

\includegraphics[angle=-90,width=3.2in]{sc8_cgm.ps}
Figure: The spectrum in Figure [*] after subtraction of a polynomial baseline, showing a fit, plotted as a continuous line by using histogram=false, of two gaussian components as given in the example in the text. Fitting two gaussians may be a little misleading here, since the broader, weaker component could be a baseline artifact, or could result from pressure broadening of the line. In the latter case a Voigt profile should be a better fit.


next up previous 174
Next: The Stack
Up: Getting To Know Your Baselines
Previous: Polynomial baselines

Specx Cookbook
Starlink Cookbook 8
Henry Matthews, Tim Jenness
1st March 1997
E-mail:P.W.Draper@durham.ac.uk

Copyright © 2008 Science and Technology Facilities Council