imap_processing.spice.geometry.spherical_to_cartesian#

imap_processing.spice.geometry.spherical_to_cartesian(spherical_coords: ndarray[tuple[int, ...], dtype[_ScalarType_co]]) ndarray[tuple[int, ...], dtype[_ScalarType_co]]#

Convert spherical coordinates (angles in degrees) to Cartesian coordinates.

Parameters:

spherical_coords (np.ndarray) –

A NumPy array with shape (n, 3), where each row contains the spherical coordinates (r, azimuth, elevation):

  • r : Distance of the point from the origin.

  • azimuth : angle in the xy-plane in degrees. Range is [0, 360) degrees.

  • elevation : angle from the xy-plane in degrees. Range is [-90, 90) degrees.

Returns:

cartesian_coords – Cartesian coordinates.

Return type:

np.ndarray