orientation

mqed.utils.orientation.spherical_to_cartesian_dipole(theta_deg, phi_deg)[source]

Converts spherical coordinates (theta, azimuthal_angle) to a Cartesian unit vector.

Parameters:
  • theta_deg (float or array-like) – Polar angle in degrees (0 to 180, from +z axis).

  • phi_deg (float or array-like) – Azimuthal angle in degrees (0 to 360, from +x axis towards +y).

Returns:

A 3-element numpy array representing the Cartesian unit vector [x, y, z].

Return type:

np.ndarray