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

Polynomial baselines

 Fitting a polynomial baseline is similar, by using the command

$\gt\!\gt$ fit-polynomial-baseline

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


 \begin{figure}
% latex2html id marker 1238

\centering

\includegraphics [angle=...
 ...ugh beam-switching in azimuth
was used. }}\end{minipage}\end{center}\end{figure}

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.:

$\gt\!\gt$ over 1 5

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


 \begin{figure}
% latex2html id marker 1256

\centering

\includegraphics [angle=...
 ...been overlaid on the original
spectrum. }}\end{minipage}\end{center}\end{figure}

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

$\gt\!\gt$ 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
Next: Gaussian models
Up: Getting To Know Your Baselines
Previous: Linear baselines

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