\(\renewcommand\AA{\unicode{x212B}}\)
EnggEstimateFocussedBackground v1¶
Summary¶
Performs iterative smoothing (low-pass filter) to estimate the background of a spectrum
See Also¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
InputWorkspace |
Input |
Mandatory |
Workspace with focussed spectra |
|
OutputWorkspace |
Output |
Mandatory |
Workspace to contain the estimated background (one for each spectrum in the InputWorkspace) |
|
NIterations |
Input |
number |
50 |
Number of iterations of the smoothing procedure to perform. Too few iterations and the background will be enhanced in the peak regions. Too many iterations and the background will be unrealistically low and not catch the rising edge at low TOF/d-spacing (typical values are in range 20-100). |
XWindow |
Input |
number |
600 |
Extent of the convolution window in the x-axis for all spectra. A reasonable value is about 4-8 times the FWHM of a typical peak/feature to be suppressed (default is reasonable for TOF spectra). This is converted to an odd number of points using the median bin width of each spectra. |
ApplyFilterSG |
Input |
boolean |
True |
Apply a Savitzky–Golay filter with a linear polynomial over the same XWindow before the iterative smoothing procedure (recommended for noisy data) |
Description¶
Estimates the background for a spectra by employing an iterative smoothing procedure adapted from an algorithm published in [1]. In each iteration a smoothing window is convolved with the data to produce a new spectra which is compared point by point with spectra from the previous iteration, with the lowest of the two intensities retained. In this way counting statistics are taken into conisderation to some extent, but if the data are noisy then this can lead to the background being underestimated (by the approxiumate amplitude of the noise). This can be avoided by rebinning/rebunching data, however this is not always desirable. Therefore there is an option to apply a Savitzky–Golay filter with a linear polynomial over a window the same length as the smoothing window before the iterative smoothing.
Useage¶
Example:
from mantid.simpleapi import *
CreateSampleWorkspace(OutputWorkspace='ws', Function='Multiple Peaks', NumBanks=1, BankPixelWidth=1, XMax=20, BinWidth=0.2)
EnggEstimateFocussedBackground(InputWorkspace='ws', OutputWorkspace='ws_bg', NIterations='200', XWindow=2.5, ApplyFilterSG=False)
References¶
The source for how this calculation is done is
Brückner, S. (2000). Estimation of the background in powder diffraction patterns through a robust smoothing procedure. Journal of Applied Crystallography, 33(3), 977-979._
Categories: AlgorithmIndex | Diffraction\Engineering