imap_processing.spice.geometry#

Functions for computing geometry, many of which use SPICEYPY.

Paradigms for developing this module:

  • Use @ensure_spice decorator on functions that directly wrap spiceypy functions

  • Vectorize everything at the lowest level possible (e.g. the decorated spiceypy wrapper function)

  • Always return numpy arrays for vectorized calls.

Functions

basis_vectors(et, from_frame, to_frame)

Get the basis vectors of the from_frame expressed in the to_frame.

cartesian_to_latitudinal(coords[, degrees])

Convert cartesian coordinates to latitudinal coordinates in radians.

cartesian_to_spherical(v[, degrees])

Convert cartesian coordinates to spherical coordinates.

frame_transform(et, position, from_frame, ...)

Transform an <x, y, z> vector between reference frames (rotation only).

frame_transform_az_el(et, az_el, from_frame, ...)

Transform azimuth and elevation coordinates between reference frames.

get_rotation_matrix(et, from_frame, to_frame)

Get the rotation matrix/matrices that can be used to transform between frames.

get_spacecraft_to_instrument_spin_phase_offset(...)

Get the spin phase offset from the spacecraft to the instrument.

imap_state(et[, ref_frame, abcorr, observer])

Get the state (position and velocity) of the IMAP spacecraft.

instrument_pointing(et, instrument, to_frame)

Compute the instrument pointing at the specified times.

solar_longitude(et[, degrees])

Compute the solar longitude of the Imap Spacecraft.

spherical_to_cartesian(spherical_coords)

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

Classes

SpiceBody(value)

Enum containing SPICE IDs for bodies that we use.

SpiceFrame(value)

Enum containing SPICE IDs for reference frames, defined in imap_wkcp.tf.