Misorientation#

class orix.quaternion.Misorientation(data: ndarray | Misorientation | list | tuple, symmetry: Tuple[Symmetry, Symmetry] | None = None)[source]#

Bases: Rotation

Misorientations \(M\).

Misorientations represent transformations from one orientation, \(O_1\) to another, \(O_2\): \(O_2 \cdot O_1^{-1}\).

They have symmetries associated with each of the starting orientations.

Parameters:
data

Quaternions.

symmetry

Crystal symmetries.

Attributes

Misorientation.a

Return or set the scalar quaternion component.

Misorientation.angle

Return the angle of rotation \(\omega = 2\arccos{|a|}\).

Misorientation.antipodal

Return the rotation and its antipodal.

Misorientation.axis

Return the axis of rotation \(\hat{\mathbf{n}} = (b, c, d)\).

Misorientation.b

Return or set the first vector quaternion component.

Misorientation.c

Return or set the second vector quaternion component.

Misorientation.conj

Return the conjugate of the quaternion \(Q^{*} = a - bi - cj - dk\).

Misorientation.d

Return or set the third vector quaternion component.

Misorientation.data

Return the data.

Misorientation.improper

Return True for improper rotations and False otherwise.

Misorientation.ndim

Return the number of navigation dimensions of the object.

Misorientation.norm

Return the norm of the data.

Misorientation.shape

Return the shape of the object.

Misorientation.size

Return the total number of entries in this object.

Misorientation.symmetry

Return or set the crystal symmetries.

Misorientation.unit

Return the unit object.

Methods

Misorientation.angle_with(other[, degrees])

Return the angles of rotation transforming the rotations to the other rotations.

Misorientation.angle_with_outer(other[, degrees])

Return the angles of rotation transforming the rotations to all the other rotations.

Misorientation.dot(other)

Return the dot products of the quaternions and the other quaternions.

Misorientation.dot_outer(other)

Return the outer dot products of the rotations and the other rotations.

Misorientation.empty()

Return an empty object with the appropriate dimensions.

Misorientation.equivalent([grain_exchange])

Return the equivalent misorientations.

Misorientation.flatten()

Return a new rotation instance collapsed into one dimension.

Misorientation.from_align_vectors(other, initial)

Return an estimated misorientation to optimally align two sets of vectors, one set in each crystal.

Misorientation.from_axes_angles(axes, angles)

Create unit quaternions from axis-angle pairs \((\hat{\mathbf{n}}, \omega)\) [Rowenhorst et al., 2015].

Misorientation.from_euler(euler[, ...])

Create unit quaternions from Euler angle sets [Rowenhorst et al., 2015].

Misorientation.from_homochoric(ho)

Create unit quaternions from homochoric vectors \(\mathbf{h}\) [Rowenhorst et al., 2015].

Misorientation.from_matrix(matrix)

Create unit quaternions from orientation matrices [Rowenhorst et al., 2015].

Misorientation.from_rodrigues(ro[, angles])

Create unit quaternions from three-component Rodrigues vectors \(\hat{\mathbf{n}}\) or four-component Rodrigues-Frank vectors \(\mathbf{\rho}\) [Rowenhorst et al., 2015].

Misorientation.from_scipy_rotation(rotation)

Return misorientationss from scipy.spatial.transform.Rotation.

Misorientation.get_distance_matrix([...])

Return the symmetry reduced smallest angle of rotation transforming every misorientation in this instance to every other misorientation [Johnstone et al., 2020].

Misorientation.get_random_sample([size, ...])

Return a new flattened object from a random sample of a given size.

Misorientation.identity([shape])

Create identity quaternions.

Misorientation.inv()

Return the inverse misorientations \(M^{-1}\).

Misorientation.map_into_symmetry_reduced_zone([...])

Return equivalent transformations which have the smallest angle of rotation as a new misorientation.

Misorientation.mean()

Return the mean quaternion with unitary weights.

Misorientation.outer(other[, lazy, ...])

Return the outer rotation products of the rotations and the other rotations or vectors.

Misorientation.random([shape, symmetry])

Create random misorientations.

Misorientation.random_vonmises([shape, ...])

Return random rotations with a simplified Von Mises-Fisher distribution.

Misorientation.reshape(*shape)

Return a new object with the same data in a new shape.

Misorientation.scatter([projection, figure, ...])

Plot misorientations in axis-angle space or the Rodrigues fundamental zone.

Misorientation.squeeze()

Return a new object with the same data with length 1-dimensions removed.

Misorientation.stack(sequence)

Return a stacked object from the sequence.

Misorientation.to_axes_angles()

Return the unit quaternions as axis-angle vectors [Rowenhorst et al., 2015].

Misorientation.to_euler([degrees])

Return the unit quaternions as Euler angles in the Bunge convention [Rowenhorst et al., 2015].

Misorientation.to_homochoric()

Return the unit quaternions as homochoric vectors [Rowenhorst et al., 2015].

Misorientation.to_matrix()

Return the unit quaternions as orientation matrices [Rowenhorst et al., 2015].

Misorientation.to_rodrigues([frank])

Return the unit quaternions as Rodrigues or Rodrigues-Frank

Misorientation.transpose(*axes)

Return a new object with the same data transposed.

Misorientation.triple_cross(q1, q2, q3)

Pointwise cross product of three quaternions.

Misorientation.unique([return_index, ...])

Return the unique rotations from these rotations.

Examples using Misorientation#

Misorientation from aligning directions

Misorientation from aligning directions