fit-polynomial-baseline
f-p-b will do. A typical bad baseline requiring a polynomial fit
is shown below in 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.:
over 1 5
As shown in Figure
this will plot the fitted curve
on top of 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.
Specx Cookbook Reduction of millimetre wave data