imap_processing.spice.geometry.cartesian_to_latitudinal#

imap_processing.spice.geometry.cartesian_to_latitudinal(coords: ndarray[tuple[int, ...], dtype[_ScalarType_co]], degrees: bool = True) ndarray[tuple[int, ...], dtype[_ScalarType_co]]#

Convert cartesian coordinates to latitudinal coordinates in radians.

This is a vectorized wrapper around spiceypy.reclat “Convert from rectangular coordinates to latitudinal coordinates.” https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/reclat_c.html

Parameters:
  • coords (np.ndarray) – Either shape (n, 3) or (3) where the last dimension represents a vector with x, y, z-components.

  • degrees (bool) – If True, the longitude and latitude coords are returned in degrees. Defaults to True.

Returns:

A NumPy array with shape (n, 3) or (3), where the last dimension contains the latitudinal coordinates (radius, longitude, latitude).

Return type:

np.ndarray