CalculatePeaksHKL v1


CalculatePeaksHKL dialog.


Calculates Miller indices for each peak. No rounding or UB optimization.


Name Direction Type Default Description
PeaksWorkspace InOut IPeaksWorkspace Mandatory Input Peaks Workspace
OverWrite Input boolean False Overwrite existing miller indices as well as empty ones.
NumIndexed Output number   Gets set with the number of indexed peaks.


Uses the UB matrix on the sample to calculate the Miller indices for all peaks in the peaks workspace. Unlike IndexPeaks v1 this algorithm does not perform any mandatory optimization. This algorithm does not round the Miller indices to the nearest integer.


Example - Calculate peak HKL values based on UB matrix

mdew = Load("TOPAZ_3680_5_sec_MDEW.nxs")
# Find some peaks. These are all unindexed so will have HKL = [0,0,0]
peaks = FindPeaksMD(InputWorkspace=mdew, MaxPeaks=1)

# Set the UB to unity
SetUB(peaks, UB=[1,0,0,0,1,0,0,0,1])

# Run the algorithm
indexed = CalculatePeaksHKL(PeaksWorkspace=peaks, OverWrite=True)

print("Number of Indexed Peaks:  {}".format(indexed))


Number of Indexed Peaks:  1

Categories: AlgorithmIndex | Crystal\Peaks