Ephemeris API¶
ApsidesTable
¶
Bases: BatchableObject
Apsides events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_valid
|
Bool[Array, ...]
|
Valid-event mask. |
required |
t_apsides
|
TDBView
|
Event epochs in |
required |
event_type
|
Int[Array, ...]
|
Event types. |
required |
distance
|
Float[Array, ...]
|
Apsides distances in |
required |
Notes
This table has a fixed output length. If the actual number of events is smaller than the allocated length, the remaining slots are padding. is_valid marks valid events and invalid padding events.
CloseApproachTable
¶
Bases: BatchableObject
Close-approach events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_valid
|
Bool[Array, ...]
|
Valid-event mask. |
required |
t_close
|
TDBView
|
Event epochs in |
required |
distance
|
Float[Array, ...]
|
Close-approach distances in |
required |
relative_velocity
|
Float[Array, ...]
|
Relative speeds in |
required |
Notes
This table has a fixed output length. If the actual number of events is smaller than the allocated length, the remaining slots are padding. is_valid marks valid events and invalid padding events.
EphemerisGenerator(target)
¶
Bases: Module
High-level generator for ephemeris tables.
Initialize the ephemeris generator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
SmallBody
|
Target body with the propagated trajectory. |
required |
optical_table(t_obs, observer, apply_refraction=False, weather=WeatherParams(), grid=False)
¶
Build optical tables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_obs
|
Time
|
Observation epochs at the observer. |
required |
observer
|
Site
|
Observer sites. |
required |
apply_refraction
|
bool
|
If |
False
|
weather
|
WeatherParams
|
Weather model used by the refraction correction. |
WeatherParams()
|
grid
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
OpticalTable
|
Optical tables for the target. The astrometric angles use the solved down-leg direction in |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the target trajectory is not initialized or the requested epoch is outside the propagated coverage. |
Notes
Vectorize :func:difforb.ephemeris.core.generate_optical_table_single.
radar_table(t_rec, rx, tx=None, tx_freq=0.0, grid=False)
¶
Build radar tables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_rec
|
Time
|
Receive epochs at the receiver site. Epochs before 1962-01-01 are not supported. |
required |
rx
|
Site
|
Receiver sites. |
required |
tx
|
Site
|
Transmitter sites. If |
None
|
tx_freq
|
Float[Array, ...]
|
Transmit frequencies in |
0
|
grid
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
RadarTable
|
Radar tables for the target. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
Raised when any receive epoch is earlier than 1962-01-01, or when the target trajectory is not initialized or the requested epoch is outside the propagated coverage. |
Notes
Vectorize :func:difforb.ephemeris.core.generate_radar_table_single.
vector_table(t_obs, observer, grid=False)
¶
Build vector tables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_obs
|
Time
|
Observation epochs at the observer. |
required |
observer
|
Site
|
Observer sites. |
required |
grid
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
VectorTable
|
Geometric, astrometric, and apparent vectors for the target. The astrometric state uses the solved down-leg light time. The apparent state adds stellar aberration on top of the astrometric state, but it does not apply solar light bending or rotation to an equator-of-date frame. |
Raises:
| Type | Description |
|---|---|
TypeError
|
Raised when |
RuntimeError
|
If the target trajectory is not initialized or the requested epoch is outside the propagated coverage. |
Notes
Vectorize :func:difforb.ephemeris.core.generate_vector_table_single.
elements_table(tdb, grid=False)
¶
Build osculating element tables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tdb
|
TDBView
|
Epochs in |
required |
grid
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
KepElement
|
Osculating Keplerian elements in the JPL Horizons ecliptic-of-J2000 reference system. |
Raises:
| Type | Description |
|---|---|
TypeError
|
Raised when |
RuntimeError
|
If the target trajectory is not initialized or the requested epoch is outside the propagated coverage. |
Notes
Vectorize :func:difforb.ephemeris.core.generate_elements_single.
find_apsides(t_start, t_end, center, max_events=5, grid=False)
¶
Find apsides events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_start
|
TDBView
|
Search interval in |
required |
t_end
|
TDBView
|
Search interval in |
required |
center
|
EphemerisBody
|
Center body. |
required |
max_events
|
int
|
Maximum number of returned events. |
5
|
grid
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
ApsidesTable
|
Periapsis and apoapsis events for the target. |
Raises:
| Type | Description |
|---|---|
TypeError
|
Raised when |
RuntimeError
|
If the target trajectory is not initialized or the requested epoch is outside the propagated coverage. |
Notes
Vectorize :func:difforb.ephemeris.core.find_apsides_single.
find_close_approaches(t_start, t_end, center, max_distance=0.5, max_events=5, grid=False)
¶
Find close-approach events.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_start
|
TDBView
|
Search interval in |
required |
t_end
|
TDBView
|
Search interval in |
required |
center
|
EphemerisBody
|
Center body. |
required |
max_distance
|
float
|
Maximum close-approach distance in |
0.5
|
max_events
|
int
|
Maximum number of returned events. |
5
|
grid
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
CloseApproachTable
|
Close-approach events for the target. |
Raises:
| Type | Description |
|---|---|
TypeError
|
Raised when |
RuntimeError
|
If the target trajectory is not initialized or the requested epoch is outside the propagated coverage. |
Notes
Vectorize :func:difforb.ephemeris.core.find_close_approaches_single.
OpticalTable
¶
Bases: BatchableObject
Optical table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_obs
|
Time
|
Observation epoch at the observer. |
required |
astrometric_ra
|
Float[Array, ...]
|
Astrometric right ascension and declination in degrees. These angles come from the solved down-leg direction in |
required |
astrometric_dec
|
Float[Array, ...]
|
Astrometric right ascension and declination in degrees. These angles come from the solved down-leg direction in |
required |
apparent_ra
|
Float[Array, ...]
|
Apparent right ascension and declination in degrees. These angles start from the astrometric direction, then apply solar light bending and stellar aberration, and then rotate to the true equator and equinox of date. For ground observers, they also include atmospheric refraction when |
required |
apparent_dec
|
Float[Array, ...]
|
Apparent right ascension and declination in degrees. These angles start from the astrometric direction, then apply solar light bending and stellar aberration, and then rotate to the true equator and equinox of date. For ground observers, they also include atmospheric refraction when |
required |
azimuth
|
Float[Array, ...]
|
Topocentric azimuth (from north to east) and elevation in degrees. These values come from the apparent topocentric direction. For ground
observers, they also include atmospheric refraction when |
required |
elevation
|
Float[Array, ...]
|
Topocentric azimuth (from north to east) and elevation in degrees. These values come from the apparent topocentric direction. For ground
observers, they also include atmospheric refraction when |
required |
delta
|
Float[Array, ...]
|
Target-observer distance in |
required |
r
|
Float[Array, ...]
|
Target-Sun distance in |
required |
phase_angle
|
Float[Array, ...]
|
Sun-target-observer phase angle in degrees. |
required |
elongation
|
Float[Array, ...]
|
Solar elongation in degrees. |
required |
mag
|
Float[Array, ...]
|
Modeled apparent magnitude. |
required |
RadarTable
¶
Bases: BatchableObject
Radar table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_rec
|
Time
|
Receive epoch at the receiver site. |
required |
radar_delay
|
Float[Array, ...]
|
Two-way light time in microseconds. |
required |
radar_doppler
|
Float[Array, ...]
|
Two-way Doppler shift in |
required |
radar_range
|
Float[Array, ...]
|
Two-way range in |
required |
radar_rate
|
Float[Array, ...]
|
Two-way range rate in |
required |
VectorTable
¶
Bases: BatchableObject
Geometric, astrometric, and apparent vector table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_obs
|
Time
|
Observation epoch at the observer. |
required |
geometric
|
RelativeState
|
Geometric relative state in fixed |
required |
astrometric
|
RelativeState
|
Astrometric relative state in fixed |
required |
apparent
|
RelativeState
|
Apparent relative state in fixed |
required |
light_time
|
Float[Array, ...]
|
One-way down-leg light time in days. This is the same light time used by |
required |