scipp.spatial.rotations_from_rotvecs

scipp.spatial.rotations_from_rotvecs

scipp.spatial.rotations_from_rotvecs(*, dims, values, unit)

Creates rotation transformations from rotation vectors.

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

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
  • dims (Sequence[str]) – The dimensions of the created variable

  • values (Union[numpy.ndarray, list]) – A numpy vector of 3 values

  • unit (Union[scipp._scipp.core.Unit, str]) – The units of the 3 provided values. Should be either ‘rad’ or ‘deg’.

Return type

scipp._scipp.core.Variable