quat (array_like, shape (N, 4) or (4,)) – Each row is a (possibly non-unit norm) quaternion in scalar-last
(x, y, z, w) format. Each quaternion will be normalized to unit
norm.
n_max (int) – The spherical harmonic order
Returns:
The rotation object with spherical harmonic order n_max.
Rotations in 3-D can be represented by a sequence of 3 rotations
around a sequence of axes. In theory, any three axes spanning the 3-D
Euclidean space are enough. In practice, the axes of rotation are
chosen to be the basis vectors.
The three rotations can either be in a global frame of reference
(extrinsic) or in a body centred frame of reference (intrinsic), which
is attached to, and moves with, the object under rotation [3].
Parameters:
n_max (int) – Spherical harmonic order.
seq (str) – Specifies sequence of axes for rotations. Up to 3 characters
belonging to the set {‘X’, ‘Y’, ‘Z’} for intrinsic rotations,
or {‘x’, ‘y’, ‘z’} for extrinsic rotations. Extrinsic and intrinsic
rotations cannot be mixed in one function call.
angles ((float or array_like, shape (N,) or (N, [1 or 2 or 3]))) –
Euler angles specified in radians (degrees is False) or degrees
(degrees is True). For a single character seq, angles can be:
a single value
array_like with shape (N,), where each angle[i] corresponds
to a single rotation
array_like with shape (N, 1), where each angle[i,0]
corresponds to a single rotation
For 2- and 3-character wide seq, angles can be:
array_like with shape (W,) where W is the width of seq, which
corresponds to a single rotation with W axes
array_like with shape (N, W) where each angle[i] corresponds
to a sequence of Euler angles describing a single rotation
degrees (bool, optional) – If True, then the given angles are assumed to be in degrees.
Default is False.
Returns:
Object containing the rotation represented by the sequence of
rotations around given axes with given angles.
Initialize from rotation matrix.
Rotations in 3 dimensions can be represented with 3 x 3 proper
orthogonal matrices [1]. If the input is not proper orthogonal,
an approximation is created using the method described in [2].
Parameters:
n_max (int) – Spherical harmonic order
matrix ((array_like, shape (N, 3, 3) or (3, 3))) – A single matrix or a stack of matrices, where matrix[i] is
the i-th matrix.
Returns:
Object containing the rotations represented by the rotation
matrices.
Initialize from quaternions.
3D rotations can be represented using unit-norm quaternions [4].
Parameters:
n_max (int) – Spherical harmonic order
quat ((array_like, shape (N, 4) or (4,))) – Each row is a (possibly non-unit norm) quaternion in scalar-last
(x, y, z, w) format. Each quaternion will be normalized to unit
norm.
Returns:
Object containing the rotations represented by input quaternions.
Initialize from rotation vectors.
A rotation vector is a 3 dimensional vector which is co-directional to
the axis of rotation and whose norm gives the angle of rotation [5].
Parameters:
n_max (int) – Spherical harmonic order
rotvec (array_like, float, shape (L, 3) or (3,)) – A single vector or a stack of vectors, where rot_vec[i] gives the
ith rotation vector.
degrees (bool, optional) – Specify if rotation angles are defined in degrees instead of
radians, by default False.
Returns:
Object containing the rotations represented by input rotation
vectors.
Rotation matrix for complex spherical harmonics around the z-axis
by a given angle. The rotation is performed such that positive angles
result in a counter clockwise rotation of the data [6].
Rotation matrix for real-valued spherical harmonics around the z-axis
by a given angle. The rotation is performed such that positive angles
result in a counter clockwise rotation of the data [7].
Parameters:
n_max (integer) – Spherical harmonic order
angle (number) – Rotation angle in radians [0, 2 pi]
Returns:
Block-diagonal Rotation matrix evaluated for the specified angle.
Wigner-D rotation matrix for Euler rotations by angles
(alpha, beta, gamma) around the (z,y,z)-axes.
The implementation follows [9]. and rotation is performed such that
positive angles result in a counter clockwise rotation of the data.
Wigner-D rotation matrix for Euler rotations for real-valued spherical
harmonics by angles (alpha, beta, gamma) around the (z,y,z)-axes.
The implementation follows [10] and the rotation is performed such that
positive angles result in a counter clockwise rotation of the data.