scipp.spatial.rotation_as_rotvec#

scipp.spatial.rotation_as_rotvec(rotation, *, unit='rad')#

Represent a rotation matrix (or matrices) as rotation vector(s).

This requires scipy to be installed, as is wraps scipy.spatial.transform.Rotation.as_rotvec().

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.

Parameters:
  • rotation (Variable) – A variable with rotation matrices.

  • unit – Angle unit for the rotation vectors.

Returns:

Variable – An array variable with rotation vectors of dtype vector3.