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_instrument_mounting_az_el(instrument)

Calculate the azimuth and elevation angle of instrument mounting.

get_lo_pivot_boresight(pivot_angle)

Calculate IMAP-Lo boresight direction as a function of pivot angle.

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.

lo_instrument_pointing(et, pivot_angle, to_frame)

Compute IMAP-Lo instrument pointing accounting for pivot angle.

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)

SPICE IDs for reference frames in imap_###.tf and imap_science_xxx.tf.