Rotations, orientations and angular momentum#
Euler angles (z-y’-z’’ convention, radians), rotation matrices and quaternions, orientation grids for powder averages, and angular momentum algebra (Wigner symbols, spherical harmonics, irreducible spherical tensor operators).
Rotations#
Passive rotation matrix from Euler angles (z-y'-z'' convention). |
|
Extract z-y'-z'' Euler angles from a rotation matrix. |
|
Convert z-y'-z'' Euler angles to a unit quaternion. |
|
Convert a unit quaternion to z-y'-z'' Euler angles. |
|
Convert a unit quaternion to a rotation matrix. |
|
Convert a rotation matrix to a unit quaternion. |
|
Rotation matrix from an axis and angle (Rodrigues formula). |
|
Extract the rotation axis and angle from a rotation matrix. |
|
Invert a unit quaternion (= conjugate). |
|
Quaternion multiplication (Hamilton product) q ⊗ r. |
|
Rotate a 3-vector (or batch of vectors) by a unit quaternion. |
|
Rotate an Euler frame around a rotation axis. |
|
Convert a Cartesian 3-vector to polar angles (phi, theta). |
|
Convert polar angles to a unit Cartesian 3-vector. |
|
Convert a 3×3 Cartesian tensor to rank-2 spherical tensor components. |
|
Convert rank-2 spherical tensor components to a 3×3 Cartesian tensor. |
Orientation grids and selection#
Return a spherical powder-averaging grid. |
|
Generate N random orientations uniformly distributed on the sphere. |
|
Compute photo-selection weight. |
Angular momentum#
Wigner 3-j symbol. |
|
Wigner 6-j symbol. |
|
Wigner rotation matrix D^J (or reduced d^J). |
|
Clebsch-Gordan coefficient |
|
Transformation matrix between uncoupled and coupled spin representations. |
|
Spherical harmonic Y_L^M(theta, phi). |
|
Compute associated Legendre polynomial \(P_L^M(z)\). |
|
Irreducible spherical tensor operator T^k_q. |
|
Transformation matrix from ISTOs to Stevens operators. |