\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | InOut | Workspace2D | Mandatory | Workspace containing a POLDI auto-correlation spectrum. |
MinimumPeakSeparation | Input | number | 15 | Minimum number of points in the spectrum by which two peaks have to be separated. |
MaximumPeakNumber | Input | number | 24 | Maximum number of peaks to be detected. |
MinimumPeakHeight | Input | number | 0 | Minimum peak height. |
OutputWorkspace | Output | TableWorkspace | Workspace containing detected peaks. |
PoldiPeakSearch is a peak-finding routine for POLDI correlation data obtained with PoldiAutoCorrelation v5. These spectra are often very spikey, so identifying peaks can be difficult, especially in the low \(Q\)-region of the spectrum. The original analysis software implemented a special procedure to avoid these problems and this implementation is very close to it.
Map each point of the spectrum \(y\), except the first and the last to the sum of its value and its neighbor’s values:
\(y'_i = y_{i-1} + y_{i} + y_{i+1}\)
The new spectrum \(y'\) contains \(n-2\) points when \(y\) contains \(n\).
Identify peak positions in \(y'\), which is done with a recursive algorithm, consisting of these steps:
Sort list by value (summed correlation counts, \(y'\)) in descending order, keep the first \(N_{max}\) items of the list.
Map peak positions from \(y'\) back to \(y\)
Perform background and fluctuation estimation:
Estimate peak intensity as \(y_{i}\)
If a minimum peak height is set, discard all peaks that are smaller than this, if not, discard all peaks that are lower than \(3\cdot\bar{s} + \bar{b}\)
The peaks are stored in a new table workspace.
Note
To run these usage examples please first download the usage data, and add these to your path. In Mantid this is done using Manage User Directories.
A typical peak search procedure would be performed on correlation data, so this analysis is performed first, followed by a peak search with default parameters.
# Load data file and instrument, perform correlation analysis
raw_6904 = LoadSINQFile(Filename = "poldi2013n006904.hdf", Instrument = "POLDI")
LoadInstrument(raw_6904, RewriteSpectraMap=True, InstrumentName = "POLDI")
correlated_6904 = PoldiAutoCorrelation(raw_6904)
# Run peak search algorithm, store peaks in TableWorkspace
peaks_6904 = PoldiPeakSearch(correlated_6904)
# The tableworkspace should contain 14 peaks.
print("The correlation spectrum of sample 6904 contains {} peaks.".format(peaks_6904.rowCount()))
Output:
The correlation spectrum of sample 6904 contains 14 peaks.
Categories: AlgorithmIndex | SINQ\Poldi
C++ header: PoldiPeakSearch.h (last modified: 2021-03-31)
C++ source: PoldiPeakSearch.cpp (last modified: 2021-05-06)