across.tools.ephemeris.base
Attributes
Classes
A base class for calculating ephemerides of Astronomical Observatories both |
Module Contents
- class Ephemeris(begin, end, step_size=60)[source]
Bases:
abc.ABCA base class for calculating ephemerides of Astronomical Observatories both ground and space-based. This abstract class provides the core functionality for computing positions and angular sizes of celestial bodies (Sun, Moon, Earth) relative to a spacecraft or observation point. It handles time series calculations with specified time intervals and step sizes.
- Parameters:
begin (datetime or Time) – Start time of ephemeris calculation
end (datetime or Time) – End time of ephemeris calculation
step_size (int, TimeDelta, or timedelta, optional) – Time step between calculations in seconds, by default 60
- gcrs[source]
Spacecraft position in Geocentric Celestial Reference System (GCRS) coordinates
- Type:
SkyCoord
Notes
This is an abstract base class that must be subclassed. Subclasses must implement the prepare_data() method to set up the spacecraft position before ephemeris calculations can be performed.
- index(t)[source]
For a given time, return an index for the nearest time in the ephemeris. Note that internally converting from Time to unix makes this run way faster.
- Parameters:
t (Time) – The time to find the nearest index for.
- Returns:
The index of the nearest time in the ephemeris.
- Return type:
int
- _compute_timestamp()[source]
Get array of timestamps based on time interval and step size.
- Returns:
If begin equals end, returns single timestamp. Otherwise returns array of timestamps from begin to end with specified step_size.
- Return type:
astropy.time.Time
- abstract prepare_data()[source]
Prepare data for ephemeris calculation. Abstract method, to be implemented by subclasses.
- compute()[source]
Compute ephemeris data.
This method orchestrates the computation of ephemeris data by first preparing the necessary data and then performing the core ephemeris calculations. It is intended to be called after initializing the Ephemeris object with the desired time range and step size.