| REMOVE-LINEAR-BASELINE | Subtract a linear slope from the X-register data |
| FIT-POLYNOMIAL-BASELINE | Fit up to a 10th order polynomial to data |
| FIT-COMPOSITE-BASELINE | Fit composite sinusoid/polynomial baseline |
| FIT-GAUSSIAN-MODEL | Fit a set of gaussian components |
| ENTER-GAUSSIAN-MODEL | Input initial or model set of gaussian components |
| CALCULATE-GAUSSIAN-MODEL | Calculate spectrum from gaussian component set |
| SHOW-GAUSSIAN-MODEL | List the currently defined gaussian components |
| SET-BASELINE-FIT | Set parameters for non-linear least-squares fitting |
A linear baseline may be removed from a quadrant using REMOVE-LINEAR-BASELINE. This routine removes a baseline defined by the average of a sequence of points at either end of the scan. FIT-POLYNOMIAL-BASELINE performs an ordinary least-squares fit of a polynomial to the data and leaves the fitted baseline (if successful) in the current array, pushing the original onto the stack. FIT-COMPOSITE-BASELINE is a horrible routine for fitting a sum of a polynomial and harmonic sinusoids (including the fundamental frequency if desired). The number of iterations, tolerance, and amount of output for these last two commands is determined by SET-BASELINE-FIT.
Additional facilities are available for investigating gaussian fits. ENTER-GAUSSIAN-MODEL lets you enter the parameters (amplitude, width and position in current X-axis units) of up to 10 gaussian profiles into the ``current model". This is used as the basis for both gaussian fitting and to calculate ``baselines" consisting of the sum of some combination of these gaussians. SHOW-GAUSSIAN-MODEL produces a listing of the current gaussian model on the current listing file.
FIT-GAUSSIAN-MODEL accepts up to 8 regions of the X-axis over which to fit the baseline, updates the model and uses this as the starting point for a non-linear least squares fit to the current spectrum in X. If the fitting procedure converges within the number of iterations set in SET- BASELINE then the stack is pushed to leave the spectrum in Y and the least-squares baseline in X - just do SUBTRACT to get the residuals.
The current gaussian model can be used to manufacture a ``gaussian baseline"
spectrum at any time using CALCULATE-GAUSSIAN-MODEL. This pushes the stack, and
clears the X-register. It then calculates a baseline from the current model.
The prompts let you select which lines in the current model are to be used for
the calculation. You can give either a range (e.g. 5,8 implies lines 5 to 8
inclusively) or a single line. Regions are added to the ``baseline" until you
exit the routine by using ^Z or CTRL(Z) in response to
the prompt.
If the current plot device is a graphics terminal the regions for fitting
baselines are determined by cursor input.
Up to ten regions can usually be selected, so that lines or other features are
excluded if so desired. If the plot device is not a graphics terminal the
baseline regions are input one (a region is defined by two values) at a time,
using ^Z to terminate the list.
A baseline may also be drawn on the graphics terminal, using DRAW-PLOT. This replaces the current spectrum with the straight-line segments joining points defined using the cross-hair. You can make up any data you like using this facility!