Skip to content

Commit

Permalink
Correct statement about combining transformations in example
Browse files Browse the repository at this point in the history
Signed-off-by: Håkon Wiik Ånes <[email protected]>
  • Loading branch information
hakonanes committed Apr 22, 2023
1 parent 02b4d7e commit 2b2c69a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
[1, 3, 2], 90, symmetry=phase2.point_group, degrees=True
)

# Get the reference misorientation (goal). Transformations are composed
# Get the reference misorientation (goal). Misorientations are obtained
# from the right, so: crystal 1 -> sample -> crystal 2
m_ref = Misorientation(o2 * (~o1), symmetry=(o1.symmetry, o2.symmetry))
m_ref = Misorientation(o2 * ~o1, symmetry=(o1.symmetry, o2.symmetry))

# Specify two directions in the first crystal
v_c1 = Miller(uvw=[[1, 1, 1], [0, 0, 1]], phase=phase1)
Expand Down
8 changes: 4 additions & 4 deletions orix/quaternion/quaternion.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ class Quaternion(Object3d):
with :math:`q_3 = (a_3, b_3, c_3, d_3) = q_1 \cdot q_2` follows as:
.. math::
a_3 = (a_1 \cdot a_2 - b_1 \cdot b_2 - c_1 \cdot c_2 - d_1 \cdot d_2)
a_3 = a_1 \cdot a_2 - b_1 \cdot b_2 - c_1 \cdot c_2 - d_1 \cdot d_2
b_3 = (a_1 \cdot b_2 + b_1 \cdot a_2 + c_1 \cdot d_2 - d_1 \cdot c_2)
b_3 = a_1 \cdot b_2 + b_1 \cdot a_2 + c_1 \cdot d_2 - d_1 \cdot c_2
c_3 = (a_1 \cdot c_2 - b_1 \cdot d_2 + c_1 \cdot a_2 + d_1 \cdot b_2)
c_3 = a_1 \cdot c_2 - b_1 \cdot d_2 + c_1 \cdot a_2 + d_1 \cdot b_2
d_3 = (a_1 \cdot d_2 + b_1 \cdot c_2 - c_1 \cdot b_2 + d_1 \cdot a_2)
d_3 = a_1 \cdot d_2 + b_1 \cdot c_2 - c_1 \cdot b_2 + d_1 \cdot a_2
Quaternion-vector multiplication with a three-dimensional vector
:math:`v = (x, y, z)` calculates a rotated vector
Expand Down

0 comments on commit 2b2c69a

Please sign in to comment.