magpack.rotations.rotate_vector_field#
- rotate_vector_field(vector_field, rot_matrix, order=1)#
Rotates a vector field according to the provided rotation matrix.
- Parameters:
- vector_fieldnp.ndarray
Vector field to be rotated, shape (3, x, y, z).
- rot_matrixnp.ndarray
Rotation matrix, shape (3, 3).
- orderint
Interpolation order (0 to 5, default is 1).
- Returns:
- np.ndarray
Rotated vector field, shape (3, x, y, z).
See also