next up previous 174
Next: Making maps
Up: Rapid Introduction to SPECX
Previous: Retrieving data

Fitting and removing baselines

One usually finds that one's spectral line lies atop some kind of baseline curvature; to display the line to better advantage one fits a linear, polynomial or other function to the line-free regions of the spectrum. It is possible to specify the ``fit regions'' either by typing in the numbers, or by using the cursor with the plot. The latter is where the interactive mode comes in handy. First type:

$>\!>$ set-int y

Then use

$>\!>$ r-l-b

to remove a linear baseline from the current spectrum. Define two fitting regions by placing the cursor in the respective positions, and typing l, r, and a (left, right, accept, region) for each. The x-register will contain the result.

To remove a polynomial baseline, type

$>\!>$ f-p-b

and define a number of regions to which the baseline is to be fitted. If you use the cursor as before, exit the plot screen with an `e' (for `exit'). If you supply the fit ranges in non-interactive mode terminate the entries with Control-d .5 Next you will be prompted for the order of polynomial to be fitted. The model fit curve is in the x-register and the original data in the y-register.6

Then to display the fit superposed on the original before subtraction, type, say

$>\!>$ over 1 5

The overlay function expects two numbers - the line width and colour.

Generally you will be confident of the results of your fit, so you can skip the above step. To see the final baseline-subtracted result type

$>\!>$ sub; n


next up previous 174
Next: Making maps
Up: Rapid Introduction to SPECX
Previous: Retrieving data

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