IndexPeaks v1

../_images/IndexPeaks-v1_dlg.png

IndexPeaks dialog.

Summary

Index the peaks using the UB from the sample.

Properties

Name Direction Type Default Description
PeaksWorkspace InOut PeaksWorkspace Mandatory Input Peaks Workspace
Tolerance Input number 0.15 Indexing Tolerance (0.15)
NumIndexed Output number   Gets set with the number of indexed peaks.
AverageError Output number   Gets set with the average HKL indexing error.
RoundHKLs Input boolean True Round H, K and L values to integers
CommonUBForAll Input boolean False Index all orientations with a common UB

Description

Given a PeaksWorkspace with a UB matrix stored with the sample, this algorithm will use UB inverse to index the peaks. If there are peaks from multiple runs in the workspace, the stored UB matrix will be used to get an initial indexing for the peaks from each individual run. Subsequently, a temporary UB matrix will be optimzed for the peaks from each individual run, and used to index the peaks from that run. In this way, a consistent indexing of the peaks from multiple runs will be obtained, which indexes the largest number of peaks, although one UB matrix may not produce exactly that indexing for all peaks, within the specified tolerance.

To not optimize the UB for each run, use the option, CommonUBForAll. In this case, the same UB stored in the workspace will be used to index all the peaks with no optimization.

Any peak with any Miller index more than the specified tolerance away from an integer will have its (h,k,l) set to (0,0,0). The calculated Miller indices can either be rounded to the nearest integer value, or can be left as decimal fractions.

Usage

Example - a simple example of IndexPeaks

Note

To run these usage examples please first download the usage data, and add these to your path. In MantidPlot this is done using Manage User Directories.

# Load Peaks found in SXD23767.raw
Load(Filename='SXD23767.peaks',OutputWorkspace='peaks_qLab')

#Set orientated lattice
ubMatrix = [-0.06452276,  0.2478114,  -0.23742194, 0.29161678, -0.00914316, -0.12523779, 0.06958942, -0.1802702,  -0.14649001]
SetUB('peaks_qLab',UB=ubMatrix)

# Run Algorithm
indexed =IndexPeaks(PeaksWorkspace='peaks_qLab',Tolerance=0.12,RoundHKLs=1)

print("Number of Indexed Peaks: {:d}".format(indexed[0]))

Output:

Number of Indexed Peaks: 147

Source

C++ source: IndexPeaks.cpp (last modified: 2018-10-05)

C++ header: IndexPeaks.h (last modified: 2018-10-05)