\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | Workspace | Mandatory | The workspace containing the normalization data. |
LLSCorrection | Input | boolean | True | Whether to apply a log-log-sqrt transformation to make data more sensitive to weaker peaks. |
IncreasingWindow | Input | boolean | False | Use an increasing moving window when clipping. |
SmoothingRange | Input | number | 10 | The size of the window used for smoothing data. No smoothing if set to 0. |
WindowSize | Input | number | 10 | The size of the peak clipping window to be used. |
OutputWorkspace | Output | Workspace | Mandatory | The workspace containing the normalization data. |
This algorithm is used to remove peaks from the input data, providing an estimation of the background in spectra. This is also known as a sensitive nonlinear iterative peak (SNIP) algorithm.
The input data can be optionally smoothed using a linear weighted average based on the value of the SmoothingRange parameter.
Smaller peaks present in the data can be exaggerated before clipping with the LLSCorrection option, which applies a log-log-sqrt function on the data. The inverse function is applied after the peaks are clipped.
If the smoothing window (s) is greater than 0, then the input is smoothed based on the following:
where \(r_{max} = \frac{s}{2} + 1\). More information about smoothing can be found in [2].
Peak clipping is done iteratively over the window size, \(w\). The order in which the data is clipped depends on whether an increasing or decreasing window is chosen: \(s = [1, 2, \cdots , w]\) or \(s = [w, w-1, \cdots , 1]\).
where \((k)\) is the current iteration of \(Y_{i}\). If the LLS transformation is enabled, the inverse function is applied before doing the last operation:
Details about increasing vs decreasing windows can be found in [2] and an example C algorithm for the peak clipping algorithm described above can be seen in [1].
If the “LLSCorrection” option is true, then the input \(Y\) is transformed by the following before clipping is done:
After clipping, the inverse function is applied:
More information about the LLS correction can be found in [1], [2], and [3].
Example usage of using this algorithm on some data with random background noise and large peaks:
[1] | (1, 2) Morháč, Miroslav, et al. Background Elimination Methods for Multidimensional Coincidence γ-Ray Spectra. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 401.1 (1997): 113–132 doi: 10.1016/s0168-9002(97)01023-1 |
[2] | (1, 2, 3) Morháč, Miroslav, and Vladislav Matoušek. Peak Clipping Algorithms for Background Estimation in Spectroscopic Data. Applied Spectroscopy 62.1 (2008): 91–106 doi: 10.1366%2F000370208783412762 |
[3] | Morhac, Miroslav. Sophisticated algorithms of analysis of spectroscopic data. XII Advanced Computing and Analysis Techniques in Physics Research. 70 (2009): 77 doi: 10.22323/1.070.0077 |
Categories: AlgorithmIndex | Diffraction\Corrections
Python: ClipPeaks.py