get_distance_matrix#
- Misorientation.get_distance_matrix(chunk_size: int = 20, progressbar: bool = True, degrees: bool = False) ndarray [source]#
Return the symmetry reduced smallest angle of rotation transforming every misorientation in this instance to every other misorientation [Johnstone et al., 2020].
- Parameters:
- chunk_size
Number of misorientations per axis to include in each iteration of the computation. Default is 20. Increasing this might reduce the computation time at the cost of increased memory use.
- progressbar
Whether to show a progressbar during computation. Default is
True
.- degrees
If
True
, the angles are returned in degrees. Default isFalse
.
- Returns:
angles
Misorientation angles in radians (
degrees=False
) or degrees (degrees=True
).
Notes
Given two misorientations \(m_i\) and \(m_j\) with the same two symmetry groups, the smallest angle is considered as the geodesic distance
\[d(m_i, m_j) = \arccos(2(m_i \cdot m_j)^2 - 1),\]where \((m_i \cdot m_j)\) is the highest dot product between symmetrically equivalent misorientations to \(m_{i,j}\), given by
\[\max_{s_k \in S_k} s_k m_i s_l s_k m_j^{-1} s_l,\]where \(s_k \in S_k\) and \(s_l \in S_l\), with \(S_k\) and \(S_l\) being the two symmetry groups.
Examples
>>> from orix.quaternion import Misorientation, symmetry >>> m = Misorientation.from_axes_angles([1, 0, 0], [0, 90], degrees=True) >>> m.symmetry = (symmetry.D6, symmetry.D6) >>> m.get_distance_matrix(progressbar=False, degrees=True) array([[ 0., 90.], [90., 0.]])