to_scipy_rotation#

Rotation.to_scipy_rotation() Rotation[source]#

Return unit quaternions as a SciPy rotation.

Returns:
scipy_rotation

A SciPy rotation (flattened) given by the unit quaternions without considering any symmetry.

Notes

SciPy by default uses the active rotation interpretation along with the vector-scalar quaternion definition, as opposed to orix’s passive one, scalar-vector interpretation. Thus, the following quaternion in orix, \(Q_{orix} = [q_0, q_1, q_2, q_3]\) represents the same transformation as the following quaternion in SciPy: \(Q_{SciPy} = [-q_1, -q_2, -q_3, q_0]\)

See the function description for from_scipy_rotation() for an example of how these differing parameterizations still produce identical transformations.

Additionally, note that orix enforces \(Q_0 \geq 0\) whereas SciPy does not. Thus, the operation:

Quaternion.from_scipy_rotation(r).to_scipy_rotation.as_quat()

will produce an identical transformation, but not necessarily an idential quaternion. Look up “quaternion double cover” for more information on why this occurs.