across.tools.ephemeris.base

Attributes

R_moon

Classes

Ephemeris

A base class for calculating ephemerides of Astronomical Observatories both

Module Contents

R_moon[source]
class Ephemeris(begin, end, step_size=60)[source]

Bases: abc.ABC

A 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

begin[source]

Start time of ephemeris calculation

Type:

Time

end[source]

End time of ephemeris calculation

Type:

Time

step_size[source]

Step size of ephemeris calculation

Type:

TimeDelta

timestamp[source]

Array of calculation timestamps

Type:

Time

gcrs[source]

Spacecraft position in Geocentric Celestial Reference System (GCRS) coordinates

Type:

SkyCoord

earth_location[source]

Spacecraft position relative to Earth

Type:

EarthLocation

moon[source]

Moon position relative to spacecraft

Type:

SkyCoord

sun[source]

Sun position relative to spacecraft

Type:

SkyCoord

earth[source]

Earth position relative to spacecraft

Type:

SkyCoord

longitude[source]

Spacecraft longitude

Type:

Longitude, optional

latitude[source]

Spacecraft latitude

Type:

Latitude, optional

height[source]

Spacecraft height above Earth’s surface

Type:

Quantity, optional

earth_radius_angle[source]

Angular radius of Earth as seen from spacecraft

Type:

Angle

moon_radius_angle[source]

Angular radius of Moon as seen from spacecraft

Type:

Angle

sun_radius_angle[source]

Angular radius of Sun as seen from spacecraft

Type:

Angle

distance[source]

Distance from spacecraft to Earth center

Type:

Quantity

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.

begin: astropy.time.Time[source]
end: astropy.time.Time[source]
step_size: astropy.time.TimeDelta[source]
timestamp: astropy.time.Time[source]
gcrs: astropy.coordinates.SkyCoord[source]
earth_location: astropy.coordinates.EarthLocation[source]
moon: astropy.coordinates.SkyCoord[source]
sun: astropy.coordinates.SkyCoord[source]
earth: astropy.coordinates.SkyCoord[source]
longitude: astropy.coordinates.Longitude | None = None[source]
latitude: astropy.coordinates.Latitude | None = None[source]
height: astropy.units.Quantity | None = None[source]
earth_radius_angle: astropy.coordinates.Angle[source]
moon_radius_angle: astropy.coordinates.Angle[source]
sun_radius_angle: astropy.coordinates.Angle[source]
distance: astropy.units.Quantity[source]
_start_unix: float[source]
_step_seconds: float[source]
__len__()[source]
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

_calc()[source]

Calculate ephemeris data based on the coordinates computed by prepare_data().

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.