eulerangle_from_rotmat#

pycraf.geometry.eulerangle_from_rotmat(R, etype='xyz')[source]#

Cartesian rotation axis and angle from rotation matrix.

Parameters:
Rarray

Rotation matrix [no units!]

etypestr, optional, ‘xyz’ or ‘zxz’

Desired Euler-angle ordering. (default: ‘xyz’)

The ordering ‘xyz’ refers to the case where first a rotation about the x-axis is performed, then about y and last about z-axis, i.e., R = Rz(alpha3).Ry(alpha2).Rx(alpha1). Likewise for ordering ‘zxz’ it is R = Rz(alpha3).Rx(alpha2).Rz(alpha1)

Returns:
angle_{1, 2, 3}Quantity

Euler rotation angles [deg]

Notes

Broadcasting is supported. Note the returned Euler angles are not unique.