CalculateUMatrix v1¶
Summary¶
Calculate the U matrix from a peaks workspace, given lattice parameters.
See Also¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
PeaksWorkspace |
InOut |
IPeaksWorkspace |
Mandatory |
An input workspace. |
a |
Input |
number |
Mandatory |
Lattice parameter a |
b |
Input |
number |
Mandatory |
Lattice parameter b |
c |
Input |
number |
Mandatory |
Lattice parameter c |
alpha |
Input |
number |
Mandatory |
Lattice parameter alpha |
beta |
Input |
number |
Mandatory |
Lattice parameter beta |
gamma |
Input |
number |
Mandatory |
Lattice parameter gamma |
Description¶
Given a set of peaks (Q in the goniometer frame, HKL values), and given
lattice parameters
The algorithm calculates first the B matrix according to Busing and Levi.
Given a set of peaks in the reference frame of the inner axis of the
goniometer,
For simplicity, we define
In the real world, such a matrix is not always possible to find. Therefore we just try minimize the difference between the two sets of p
In equation (3),
We are going to write the scalar product of the vectors in terms of
quaternions 2. We define
Then equation (4) will be written as
We define matrices
and
Then, we can rewrite equation (5) using matrices 3, 4:
The problem of finding
where
Then the sum in equation (11) is maximized for
Therefore U is the rotation represented by the quaternion
For more information see the documentation for UB matrix.
Categories: AlgorithmIndex | Crystal\UBMatrix
Source¶
C++ header: CalculateUMatrix.h
C++ source: CalculateUMatrix.cpp