next up previous 174
Next: Gaussian models
Up: Getting To Know Your Baselines
Previous: Linear baselines


Polynomial baselines

Fitting a polynomial baseline is similar, by using the command

$>\!>$ fit-polynomial-baseline

f-p-b will do. A typical bad baseline requiring a polynomial fit is shown below in Figure [*].

\includegraphics[angle=-90,width=3.2in]{sc8_badbaseline.ps}
Figure: This spectrum was obtained towards a bright planet. The penalty is the poor baseline, even though beam-switching in azimuth was used.

Again, in interactive mode the screen will display the current spectrum and you have to tell it where to fit the polynomial. There are two differences from a linear baseline removal though; first, you can choose one or more regions, and second, after you fit a baseline SPECX won't remove it until you tell it to. You use the same keys as before, l for the left boundary of a region, r for the right and a to accept the region. When you are done marking regions, hit the e for exit and SPECX will ask you for the order of polynomial you want and then make its fit.

In non-interactive mode the exchange might look like:

 >> f-p-b
   4 baseline regions currently defined
  Type intervals, one at a time, EOF to finish
 Current units are km/s  
 
 # [  -15.96,   10.59] 0 20
 # [   26.37,   40.18] 30 60
 # [   47.76,   56.77] 80 100
 # [   85.82,  105.52]  
 Order of polynomial to be fitted? [ 5] 4
 >>

The fitted baseline is now the current spectrum in the x-register, so if you want to look at it just use the overlay command; e.g.:

$>\!>$ over 1 5

As shown in Figure [*] this will plot the fitted curve on top of the original spectrum.

\includegraphics[angle=-90,width=3.2in]{sc8_fpb.ps}
Figure: A portion of the baseline of the spectrum in Figure [*] fitted with a polynomial function using f-p-b. The polynomial has been overlaid on the original spectrum.

To remove the baseline from the spectrum you subtract the fit from the original (this places the difference in the top buffer): i.e. to subtract the fit and display the result type

$>\!>$ sub;n

In the cases of complex baselines in which you see baseline ripple (i.e. sinusoidal effects) using the command fit-composite-baseline (f-c-b) can be a better choice. However, it is necessary to experiment with this command to achieve the best results.



next up previous 174
Next: Gaussian models
Up: Getting To Know Your Baselines
Previous: Linear 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