matvis.coordinates.theta_hat

matvis.coordinates.theta_hat(theta, phi)[source]

Return the unit vector theta_hat in Cartesian coords for spherical angles.

Parameters:
  • theta (array_like) – Colatitude angle(s), in radians.

  • phi (array_like) – Longitude angle(s), in radians.

Returns:

vec – Cartesian components of theta_hat.

Return type:

ndarray, shape (3, …)