imap_processing.spice.geometry#

Functions for computing geometry, many of which use SPICE.

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_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).

get_instrument_spin_phase(query_met_times, ...)

Get the instrument spin phase for the input query times.

get_rotation_matrix(et, from_frame, to_frame)

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

get_spacecraft_spin_phase(query_met_times)

Get the spacecraft spin phase for the input query times.

get_spacecraft_to_instrument_spin_phase_offset(...)

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

get_spin_data()

Read spin file using environment variable and return spin data.

imap_state(et[, ref_frame, 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.

spherical_to_cartesian(spherical_coords)

Convert spherical coordinates 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.