next up previous
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:

$\gt\!\gt$ set-int y

Then use

$\gt\!\gt$ 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

$\gt\!\gt$ 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 .[*] 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.[*]

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

$\gt\!\gt$ 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

$\gt\!\gt$ sub; n



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

Specx Cookbook Reduction of millimetre wave data
Starlink Cookbook 8
Henry Matthews, Tim Jenness
1st March 1997
E-mail:ussc@star.rl.ac.uk

Copyright © 2005 Council for the Central Laboratory of the Research Councils