FindSXPeaks v1

../_images/FindSXPeaks-v1_dlg.png

FindSXPeaks dialog.

Summary

Takes a 2D workspace as input and finds the highest intensity point in each 1D spectrum. This is used in particular for single crystal as a quick way to find strong peaks.

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory The name of the Workspace2D to take as input
RangeLower Input number Optional The X value to search from (default 0)
RangeUpper Input number Optional The X value to search to (default FindSXPeaks)
StartWorkspaceIndex Input number 0 Start spectrum number (default 0)
EndWorkspaceIndex Input number Optional End spectrum number (default FindSXPeaks)
SignalBackground Input number 10 Multiplication factor for the signal background
Resolution Input number 0.01 Tolerance needed to avoid peak duplication in number of pixels
OutputWorkspace Output PeaksWorkspace   The name of the PeaksWorkspace in which to store the list of peaks found

Description

Detector-space, single crystal peak finding. Finds peaks by searching through each spectra and looking for the highest intensity bin within a given x range.

Notable points:

  • The highest intensity bin is taken to be the peak, so the algorithm only finds one peak per spectra.
  • Peaks that are not above the background are culled. The background is calculated as the average of the start and end intensity multiplied by the provided SignalBackground parameter.
  • Calculated Qlab follows the Busy, Levy 1967 convention.
  • The resolution parameter defines a tolerance which is compared to the absolute difference between the parameters \phi, 2\theta, and t of two found peaks. If the absolute difference between any of the parameters for two peaks is greater than the product of the tolerance value and the parameter value then the two peaks are classed as not the same. i.e. if |\phi_1 - \phi_2| > tolerance * \phi_1 then peaks 1 & 2 are not the same (as well as similar definitions for 2\theta and t).

Usage

Example

# create histogram workspace
ws=CreateSampleWorkspace()

wsPeaks = FindSXPeaks(ws)

print "Peaks found: " + str(wsPeaks.getNumberPeaks())

Output:

Peaks found: 174

Categories: Algorithms | Crystal\Peaks | Optimization\PeakFinding

Source

C++ source: FindSXPeaks.cpp

C++ header: FindSXPeaks.h