\(\renewcommand\AA{\unicode{x212B}}\)

TransformHKL v1

../_images/TransformHKL-v1_dlg.png

TransformHKL dialog.

Summary

Specify a 3x3 matrix to apply to (HKL) vectors as a list of 9 comma separated numbers. Both the UB and HKL values will be updated

Properties

Name Direction Type Default Description
PeaksWorkspace InOut IPeaksWorkspace Mandatory Input Peaks Workspace
Tolerance Input number 0.15 Indexing Tolerance (0.15)
HKLTransform Input dbl list 1,0,0,0,1,0,0,0,1 Specify 3x3 HKL transform matrix as a comma separated list of 9 numbers
NumIndexed Output number   Gets set with the number of indexed peaks.
AverageError Output number   Gets set with the average HKL indexing error.

Description

Given a PeaksWorkspace with a UB matrix stored with the sample, this algorithm will accept a 3x3 transformation matrix \(M\), change \(UB\) to \(UBM^{-1}\) and map each \((HKL)\) vector to \(M(HKL)\). For example, the transformation with elements 0,1,0,1,0,0,0,0,-1 will interchange the \(H\) and \(K\) values and negate \(L\). This algorithm should allow the usr to perform any required transformation of the Miller indices, provided that transformation has a positive determinant. If a transformation with a negative or zero determinant is entered, the algorithm with throw an exception. The 9 elements of the transformation must be specified as a comma separated list of numbers.

Usage

Example:

ws=LoadIsawPeaks("TOPAZ_3007.peaks")
FindUBUsingFFT(ws,MinD=8.0,MaxD=13.0)

print("Before Transformation:")
print(ws.sample().getOrientedLattice().getUB())

#This HKLTransform is a matrix that will swap H and K and negate L
TransformHKL(ws,HKLTransform="0,1,0,1,0,0,0,0,-1")
print("\nAfter Transformation:")
print(ws.sample().getOrientedLattice().getUB())

Output:

Before Transformation:
[[ 0.01223576  0.00480107  0.08604016]
 [-0.11654506  0.00178069 -0.00458823]
 [-0.02737294 -0.08973552 -0.02525994]]

After Transformation:
[[ 0.00480107  0.01223576 -0.08604016]
 [ 0.00178069 -0.11654506  0.00458823]
 [-0.08973552 -0.02737294  0.02525994]]

Categories: AlgorithmIndex | Crystal\Peaks

Source

C++ header: TransformHKL.h (last modified: 2021-03-31)

C++ source: TransformHKL.cpp (last modified: 2021-03-31)