get_distance_matrix#
- Orientation.get_distance_matrix(lazy: bool = False, chunk_size: int = 20, progressbar: bool = True, degrees: bool = False) ndarray [source]#
Return the symmetry reduced smallest angle of rotation transforming all these orientations to all the other orientations [Johnstone et al., 2020].
- Parameters:
- lazy
Whether to perform the computation lazily with Dask. Default is
False
.- chunk_size
Number of orientations per axis to include in each iteration of the computation. Default is 20. Only applies when
lazy=True
. Increasing this might reduce the computation time at the cost of increased memory use.- progressbar
Whether to show a progressbar during computation if
lazy=True
. Default isTrue
.- degrees
If
True
, the angles are returned in degrees. Default isFalse
.
- Returns:
angles
Symmetry reduced angles in radians (
degrees=False
) or degrees (degrees=True
).
Notes
Given two orientations \(g_i\) and \(g_j\), the smallest angle is considered as the geodesic distance
\[d(O_i, O_j) = \arccos(2(O_i \cdot O_j)^2 - 1),\]where \((O_i \cdot O_j)\) is the highest dot product between symmetrically equivalent orientations to \(O_{i,j}\).