opihiexarata.ephemeris.jplhorizons module

The different ephemeris engines which use JPL horizons as its backend.

class opihiexarata.ephemeris.jplhorizons.JPLHorizonsWebAPIEngine(semimajor_axis: float, eccentricity: float, inclination: float, longitude_ascending_node: float, argument_perihelion: float, mean_anomaly: float, epoch: float)[source]

Bases: EphemerisEngine

This obtains the ephemeris of an asteroid using JPL horizons provided the Keplerian orbital elements of the asteroid as determined by orbital solutions.

semimajor_axis

The semi-major axis of the orbit, in AU.

Type:

float

eccentricity

The eccentricity of the orbit.

Type:

float

inclination

The angle of inclination of the orbit, in degrees.

Type:

float

longitude_ascending_node

The longitude of the ascending node of the orbit, in degrees.

Type:

float

argument_perihelion

The argument of perihelion of the orbit, in degrees.

Type:

float

mean_anomaly

The mean anomaly of the orbit, in degrees.

Type:

float

epoch

The modified Julian date epoch of the osculating orbital elements.

Type:

float

ra_velocity

The right ascension angular velocity of the target, in degrees per second.

Type:

float

dec_velocity

The declination angular velocity of the target, in degrees per second.

Type:

float

ra_acceleration

The right ascension angular acceleration of the target, in degrees per second squared.

Type:

float

dec_acceleration

The declination angular acceleration of the target, in degrees per second squared.

Type:

float

__init__(semimajor_axis: float, eccentricity: float, inclination: float, longitude_ascending_node: float, argument_perihelion: float, mean_anomaly: float, epoch: float) None[source]

Creating the engine.

Parameters:
  • semimajor_axis (float) – The semi-major axis of the orbit, in AU.

  • eccentricity (float) – The eccentricity of the orbit.

  • inclination (float) – The angle of inclination of the orbit, in degrees.

  • longitude_ascending_node (float) – The longitude of the ascending node of the orbit, in degrees.

  • argument_perihelion (float) – The argument of perihelion of the orbit, in degrees.

  • mean_anomaly (float) – The mean anomaly of the orbit, in degrees.

  • epoch (float) – The full Julian date epoch of these osculating orbital elements.

Return type:

None

__parse_jpl_horizons_output() Table

This function serves to parse the output from the JPL horizons. It is a text output that is human readable but some parsing is needed. We do that here, assuming the quantities in the original request.

Parameters:

response_text (str) – The raw response from the JPL horizons web API service.

_query_jpl_horizons(start_time: float, stop_time: float, time_step: float) Table[source]

This function queries JPL horizons. Using the current orbital elements, and provided a minimum time, maximum time, and time step, we can fetch the new table of ephemeris measurements.

Parameters:
  • start_time (float) – The time that the ephemeris should start at, in Julian days.

  • stop_time (float) – The time that the ephemeris should stop at, in Julian days.

  • time_step (float) – The time step of the entries of the ephemeris calculation, in seconds. (Note, JPL does not accept anything less than a minute.)

Returns:

epidermis_table – The table of computed sky locations over time from JPL horizons.

Return type:

Table

_refresh_ephemeris(start_time: float = None, stop_time: float = None, time_step: float = None) None[source]

This function refreshes the calculations rederiving the solution table and the ephemeris function.

Parameters:
  • start_time (float, default = None) – The time that the ephemeris should start at, in Julian days. If not provided, then the old start time will be used instead.

  • stop_time (float, default = None) – The time that the ephemeris should stop at, in Julian days. If not provided, then the old stop time will be used instead.

  • time_step (float, default = None) – The time step of the entries of the ephemeris calculation, in seconds. (Note, JPL does not accept anything less than a minute.) If not provided, then the old time step will be used instead.

Return type:

None

forward_ephemeris(future_time: float) tuple[float, float][source]

This allows the computation of future positions at a future time using the derived ephemeris.

Parameters:

future_time (array-like) – The set of future times which to derive new RA and DEC coordinates. The time must be in Julian day time.

Returns:

  • future_ra (ndarray) – The set of right ascensions that corresponds to the future times, in degrees.

  • future_dec (ndarray) – The set of declinations that corresponds to the future times, in degrees.