across.tools.ephemeris.jpl_ephem
Classes
JPL Horizons-based ephemeris calculation. |
Functions
|
Compute space ephemeris data using JPL Horizons system. |
Module Contents
- class JPLEphemeris(begin, end, step_size=60, naif_id=None)[source]
Bases:
across.tools.ephemeris.base.EphemerisJPL Horizons-based ephemeris calculation.
This class provides functionality to calculate ephemeris data using JPL Horizons system. It requires a Navigation and Ancillary Information Facility (NAIF) ID to identify the celestial object of interest.
- Parameters:
begin (datetime or Time) – Start time of the ephemeris calculation
end (datetime or Time) – End time of the ephemeris calculation
step_size (int or TimeDelta or timedelta, default=60) – Time step between ephemeris points in seconds
naif_id (int, optional) – NAIF ID of the celestial object for JPL Horizons query
Notes
The class uses the JPL Horizons API to fetch vector data for the specified celestial object and converts it to both GCRS and ITRS coordinate frames.
- Raises:
ValueError – If no NAIF ID is provided when preparing the data
- compute_jpl_ephemeris(begin, end, step_size, naif_id)[source]
Compute space ephemeris data using JPL Horizons system.
- Parameters:
begin (Union[datetime, Time]) – Start date and time for ephemeris computation
end (Union[datetime, Time]) – End date and time for ephemeris computation
step_size (Union[int, timedelta, TimeDelta]) – Time step size between ephemeris points, in seconds if int
naif_id (int) – Navigation and Ancillary Information Facility (NAIF) object identifier (e.g., 301 for Moon. -48 for HST)
- Returns:
An Ephemeris object containing the computed ephemeris data
- Return type:
Notes
This function uses the JPL Horizons system to compute high-precision ephemeris data for celestial bodies in space-based reference frame.
Examples
>>> from datetime import datetime >>> begin = datetime(2023, 1, 1) >>> end = datetime(2023, 1, 2) >>> moon_ephemeris = compute_jpl_ephemeris(begin, end, 60, 301)