FindSXPeaks v1

../_images/FindSXPeaks-v1_dlg.png

FindSXPeaks dialog.

Summary

Takes a 2D workspace as input and find the FindSXPeaksimum 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 high intensity bins. If a bin has high intensity it is a candidate for a peak.

Notable points:

  • The highest intensity bin is taken to be the peak, so 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.

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