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 is 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 is True (default).

degrees

If True, the angles are returned in degrees. Default is False.

Returns:
angles

Symmetry reduced angles in radians (degrees is False) or degrees (degrees True).

Notes

Given two orientations \(g_i\) and \(g_j\), the smallest angle is considered as the geodesic distance

\[d(g_i, g_j) = \arccos(2(g_i \cdot g_j)^2 - 1),\]

where \((g_i \cdot g_j)\) is the highest dot product between symmetrically equivalent orientations to \(g_{i,j}\).