Spectral Background Subtraction using a Polynomial with plt_mult

plt_mult can be used to view and process a file containing energy in the first column and one or more spectral intensities in further columns. It is invoked as:
plt_mult file_name
where the file_name must not contain blank characters.
In a first go, all questions can be answered by cr and the resulting graph.ps file viewed by
gv graph.ps &
An example of such a data with a strong variation of background intensity is shown below:


It may be efficient to enable the gv option "watch file", when working on background subtractions, so that later graph.ps files overwriting the previous one will be shown immediately.

As soon as one wishes to go beyond linear interpolation for background subtraction, one may want to use many data points of background data to minimize dependence of the background interpolation function on noise. For a polynomial fit, one needs to define the energy ranges where the measured spectrum just shows background intensity.
It is assumed that background intensity is starting at the begin of the tabulation up to a #energy1. If there is an intermediate energy interval between L2/L3 or M4/M5 one needs to specify #energy2 #energy3 . Finally there should be a an inverval with background intensity from #energy4 up to the upper end of the tabulation. Above example shows a relatively large sum of intervals with background intensity with over 1000 tabulation points. Such a data set requires and supports relatively high order polynomials for a global least squares fit. For example requesting a least squares fit with a polynomial of order 11 with energy bounds 774 784 789.5 and 796 is done by answering the 'remove background' question:
L11 774 784 789.5 796

This background subtraction result may be perfectly useful as experimental reference file for semi-empirical refinement of the multiX multiplet model. Even a bit lower orders may do, albeit L8 is clearly not flexible enough yet. The small negative intensities for L11 in the regions of interest for the multiplet model, albeit barely outside the noise RMS can be improved by a higher order polynomial


The comparison of the two graphs provides also a hint at the level of confidence that may be expected from such background subtracted spectra.
One should avoid overly high polynomial orders, as the background interpolation across our region of interest becomes shaken for minor fit improvements in the support region of the background fit. In this data set, background subtractions L21 and up show hints at questional improvements. L28 and up produce sufficiently significant negative spectral intensity to trigger an automatic Warning message by plt_mult.
If original data is chosen after L... type background subtraction, then the background fit functions are shown as fine lines in addition. In the example of L28 it is obvious how these interpolation functions have lead to negative spectral intensities after background subtraction. Also wiggly or unplausible interpolation lines are a stron hint that the specific background subtraction probably may be invalid.



As this llustration shows spectroscopy of a Co L2/3 spectrum of a surface species, it is interesting to compare polynomial background fitting to the use of the measured spectrum of the blank surface as background. The L16 background fit, cropped after fitting to a tighter energy range:

Cropping to this smaller energy range and using an L6 background subtraction yields the result below:

The result using the measured background was this:


It is obvious that the noise from the background measurement adds to the noise after background subtraction. It is also obvious that the measurement of the blank surface does not contain all background components present in the measurement with covered surface.
In summary: the result of the subtraction of measured background intensity provides support for the alternate use of a least squares polynomial interpolation approach, as in plt_mult, for background subtraction.