next up previous contents
Next: FIT-POLYNOMIAL-BASELINE Up: List of commands in Previous: FIT-COMPOSITE-BASELINE   Contents


FIT-GAUSSIAN-MODEL

Uses a non-linear least squares routine to fit a set of gaussians to the current spectrum, using only data points within the nominated intervals (10 intervals max.) Since the general problem is non-linear it is necessary to input an initial guess - this consists of up to 10 gaussian components, defined by their amplitude, width and position.

The fitting procedure is controlled by setting the control parameters FIT_TOL, MAX_ITS and FIT_DEBUG. These have the meanings listed below:

FIT_TOL I4 Specifies the convergence criterion. If the fractional change in the sum-squared-error from one interation to the next is less than FIT_TOL then the process has converged. [.05]
MAX_ITS I4 Specifies the maximum number of iterations to be executed. [20]
FIT_DEBUG I4
Determines the type and amount of debug information written to the screen.
-1 no printing [Default]
0 printing after convergence only
1 print diagnostic information
2 as above plus gradient check

Other flags:
N_INTS I4 Number of intervals to use for analysis.
BLF_INTS R4 Pairs of channels defining spectral intervals to be used for baseline fitting, analysis etc..
NGAUSS I4 Number of gaussian components currently defined.
AMP_WID_POS(30) R4 Amplitude, width and position of each component in current units (thus really AMP_WID_POS(3,10)).

If the fit is successful the data stack is pushed and the fitted baseline/model is left in the X-register; use SUBTRACT-SPECTRUM to see the residuals.

Examples:

    fit_tol = .05
    max_its = 20
    fit_debug = -1
    >> fit-gaussian-model<CR>
    Type intervals, one at a time, CTRL(Z) to finish
    Current units are km/s  

    # -10 10<CR>
    # ^z<CR>

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

    Current units are km/s  

    Line  1: 10 5 0<CR>
    Line  2: 5 3 7<CR>
    Line  3: ^z<CR>


         No of Iterations =     6          Final SUMSQ = 0.1580E+01

                  Parameters of current gaussian model

                 N     Amp.      Width (km/s)  Pos'n (km/s)
                 1      0.7          4.3            2.3
                 2      1.3          6.5            7.0



    Baseline calculated - Pushed into stack
    ..


next up previous contents
Next: FIT-POLYNOMIAL-BASELINE Up: List of commands in Previous: FIT-COMPOSITE-BASELINE   Contents
Jamie Leech 2004-08-16