matvis.coordinates.spherical_basis_vector_rotation_matrix

matvis.coordinates.spherical_basis_vector_rotation_matrix(theta, phi, rotation_matrix, beta, alpha)[source]

Get the rotation matrix for vectors in theta/phi basis to a new reference frame.

Parameters:
  • theta (array_like) – Colatitude and longitude in the original frame.

  • phi (array_like) – Colatitude and longitude in the original frame.

  • rotation_matrix (ndarray, shape (3,3,...)) – Bulk 3D rotation carrying original frame → new frame.

  • beta (array_like) – Colatitude and longitude in the new (rotated) frame.

  • alpha (array_like) – Colatitude and longitude in the new (rotated) frame.

Returns:

bmat

2×2 rotation matrices in the spherical basis:

[[ cos X, sin X], [-sin X, cos X]],

where X is the angle between the two basis sets.

Return type:

ndarray, shape (2,2,…)