diff --git a/examples/misorientations/misorientation_from_aligning_directions.py b/examples/misorientations/misorientation_from_aligning_directions.py index d027d17b..93127677 100644 --- a/examples/misorientations/misorientation_from_aligning_directions.py +++ b/examples/misorientations/misorientation_from_aligning_directions.py @@ -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) diff --git a/orix/quaternion/quaternion.py b/orix/quaternion/quaternion.py index 472dd58f..19e0624d 100644 --- a/orix/quaternion/quaternion.py +++ b/orix/quaternion/quaternion.py @@ -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