OrientationRegion#
- class orix.quaternion.OrientationRegion(data: ndarray | Rotation | list | tuple)[source]#
Bases:
Rotation
Some subset of the complete space of orientations.
The complete orientation space represents every possible orientation of an object. The whole space is not always needed, for example if the orientation of an object is constrained or (most commonly) if the object is symmetrical. In this case, the space can be segmented using sets of Rotations representing boundaries in the space. This is clearest in the Rodrigues parametrisation, where the boundaries are planes, such as the example here: the asymmetric domain of an adjusted 432 symmetry.
Rotations or orientations can be inside or outside of an orientation region.
Attributes
Return or set the scalar quaternion component.
Return the angle of rotation \(\omega = 2\arccos{|a|}\).
Return the rotation and its antipodal.
Return the axis of rotation \(\hat{\mathbf{n}} = (b, c, d)\).
Return or set the first vector quaternion component.
Return or set the second vector quaternion component.
Return the conjugate of the quaternion \(Q^* = a - bi - cj - dk\).
Return or set the third vector quaternion component.
Return the data.
Return
True
for improper rotations andFalse
otherwise.Return the number of navigation dimensions of the object.
Return the norm of the data.
Return the shape of the object.
Return the total number of entries in this object.
Return the unit object.
Methods
OrientationRegion.angle_with
(other[, degrees])Return the angles of rotation transforming the rotations to the other rotations.
OrientationRegion.angle_with_outer
(other[, ...])Return the angles of rotation transforming the rotations to all the other rotations.
OrientationRegion.dot
(other)Return the dot products of the quaternions and the other quaternions.
OrientationRegion.dot_outer
(other)Return the outer dot products of the rotations and the other rotations.
Return an empty object with the appropriate dimensions.
Return a new rotation instance collapsed into one dimension.
OrientationRegion.from_align_vectors
(other, ...)Estimate a quaternion to optimally align two sets of vectors.
OrientationRegion.from_axes_angles
(axes, angles)Create unit quaternions from axis-angle pairs \((\hat{\mathbf{n}}, \omega)\) [Rowenhorst et al., 2015].
OrientationRegion.from_euler
(euler[, ...])Create unit quaternions from Euler angle sets [Rowenhorst et al., 2015].
Create unit quaternions from homochoric vectors \(\mathbf{h}\) [Rowenhorst et al., 2015].
OrientationRegion.from_matrix
(matrix)Create unit quaternions from orientation matrices [Rowenhorst et al., 2015].
OrientationRegion.from_neo_euler
(neo_euler)[Deprecated] Create unit quaternion(s) from a neo-euler (vector) representation.
OrientationRegion.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].
OrientationRegion.from_scipy_rotation
(rotation)Create unit quaternions from
scipy.spatial.transform.Rotation
.OrientationRegion.from_symmetry
(s1[, s2])The set of unique (mis)orientations of a symmetrical object.
Suitable Rotations for the construction of a wireframe.
OrientationRegion.get_random_sample
([size, ...])Return a new flattened object from a random sample of a given size.
OrientationRegion.identity
([shape])Create identity quaternions.
Return the inverse rotations \(R^{-1}\).
Return the mean quaternion with unitary weights.
OrientationRegion.outer
(other[, lazy, ...])Return the outer rotation products of the rotations and the other rotations or vectors.
OrientationRegion.random
([shape])Create object with random data.
OrientationRegion.random_vonmises
([shape, ...])Return random rotations with a simplified Von Mises-Fisher distribution.
OrientationRegion.reshape
(*shape)Return a new object with the same data in a new shape.
Return a new object with the same data with length 1-dimensions removed.
OrientationRegion.stack
(sequence)Return a stacked object from the sequence.
Return the unit quaternions as axis-angle vectors [Rowenhorst et al., 2015].
OrientationRegion.to_euler
([degrees])Return the unit quaternions as Euler angles in the Bunge convention [Rowenhorst et al., 2015].
Return the unit quaternions as homochoric vectors [Rowenhorst et al., 2015].
Return the unit quaternions as orientation matrices [Rowenhorst et al., 2015].
OrientationRegion.to_rodrigues
([frank])Return the unit quaternions as Rodrigues or Rodrigues-Frank
OrientationRegion.transpose
(*axes)Return a new object with the same data transposed.
OrientationRegion.triple_cross
(q1, q2, q3)Pointwise cross product of three quaternions.
OrientationRegion.unique
([return_index, ...])Return the unique rotations from these rotations.
Return the vertices of the asymmetric domain.