orbix.observatory#

Observatory geometry: L2 halo orbit, keepout, planetary ephemerides.

Submodules#

Classes#

Observatory

Space telescope observatory platform.

ObservatoryL2Halo

Space telescope on an L2 halo orbit.

Functions#

body_angle(obs_pos_eclip, body_pos_eclip, ra_rad, ...)

Angle between a solar system body and a target as seen from the observatory.

is_observable(obs_pos_eclip, ra_rad, dec_rad, mjd[, ...])

Check if a target is observable (outside all keepout zones).

Package Contents#

orbix.observatory.body_angle(obs_pos_eclip, body_pos_eclip, ra_rad, dec_rad, mjd)[source]#

Angle between a solar system body and a target as seen from the observatory.

Parameters:
  • obs_pos_eclip (jax.numpy.ndarray) – Observatory heliocentric ecliptic position (AU).

  • body_pos_eclip (jax.numpy.ndarray) – Body heliocentric ecliptic position (AU).

  • ra_rad (float) – Target RA in radians.

  • dec_rad (float) – Target Dec in radians.

  • mjd (float) – MJD for coordinate conversion.

Returns:

Angular separation in radians.

Return type:

float

orbix.observatory.is_observable(obs_pos_eclip, ra_rad, dec_rad, mjd, ko_sun_min_deg=45.0, ko_sun_max_deg=180.0, ko_earth_min_deg=0.0, ko_earth_max_deg=180.0)[source]#

Check if a target is observable (outside all keepout zones).

Parameters:
  • obs_pos_eclip (jax.numpy.ndarray) – Observatory heliocentric ecliptic position (AU), shape (3,).

  • ra_rad (float) – Target right ascension in radians.

  • dec_rad (float) – Target declination in radians.

  • mjd (float) – Modified Julian Date.

  • ko_sun_min_deg (float) – Minimum Sun keepout angle (degrees).

  • ko_sun_max_deg (float) – Maximum Sun keepout angle (degrees).

  • ko_earth_min_deg (float) – Minimum Earth keepout angle (degrees).

  • ko_earth_max_deg (float) – Maximum Earth keepout angle (degrees).

Returns:

True if the target is observable, False if it falls in a keepout zone.

Return type:

jaxtyping.Array

class orbix.observatory.Observatory[source]#

Bases: equinox.Module

Space telescope observatory platform.

Composes an ObservatoryL2Halo orbit model with operational scalars (thermal state, overheads, wavefront stability, keepout limits). All scalar fields have sensible defaults so a bare Observatory(orbit=orbit) constructs a reasonable HWO-like platform.

Parameters:
  • orbit – L2 halo orbit model.

  • temperature_K – Telescope equilibrium temperature in Kelvin.

  • settling_time_d – Slew-settling time in days.

  • overhead_multi – Multiplicative overhead factor on science time.

  • overhead_fixed_s – Fixed overhead in seconds per observation.

  • stability_fact – Wavefront stability factor (EXOSIMS speckle model).

  • keepout_min_deg – Minimum allowed solar elongation in degrees.

  • keepout_max_deg – Maximum allowed solar elongation in degrees.

orbit: orbix.observatory.orbit.ObservatoryL2Halo#
temperature_K: float = 270.0#
settling_time_d: float = 1.0#
overhead_multi: float = 1.0#
overhead_fixed_s: float = 0.0#
stability_fact: float = 1.0#
keepout_min_deg: float = 0.0#
keepout_max_deg: float = 180.0#
class orbix.observatory.ObservatoryL2Halo[source]#

Bases: equinox.Module

Space telescope on an L2 halo orbit.

This is an equinox module that stores the halo orbit state and provides JIT-compatible methods for position and geometry queries.

The orbit is parameterized as a periodic interpolation of a ~6-month halo around the Sun-Earth L2 point.

Parameters:
  • equinox_mjd – Reference equinox epoch in MJD (default: 60575.25).

  • halo_start_day – Offset into halo orbit at mission start (days).

Example

>>> obs = ObservatoryL2Halo.from_default()
>>> pos = obs.position_ecliptic(60000.0)  # AU, shape (3,)
_interp_x: interpax.Interpolator1D#
_interp_y: interpax.Interpolator1D#
_interp_z: interpax.Interpolator1D#
_period_yr: float#
_L2_dist_AU: float#
_mu: float#
_equinox_mjd: float#
_halo_start_yr: float#
_d2yr: float = 0.0027378507871321013#
classmethod from_default(equinox_mjd=60575.25, halo_start_day=0.0)[source]#

Create from bundled L2 halo orbit data.

Parameters:
  • equinox_mjd (float) – Reference equinox epoch in MJD.

  • halo_start_day (float) – Offset into halo orbit at mission start (days).

Returns:

Configured ObservatoryL2Halo instance.

Return type:

ObservatoryL2Halo

classmethod from_npz(npz_path, equinox_mjd=60575.25, halo_start_day=0.0)[source]#

Create from a custom .npz file.

Parameters:
  • npz_path (str) – Path to .npz file with halo orbit data.

  • equinox_mjd (float) – Reference equinox epoch in MJD.

  • halo_start_day (float) – Offset into halo orbit at mission start (days).

Returns:

Configured ObservatoryL2Halo instance.

Return type:

ObservatoryL2Halo

property period_yr: float#

Halo orbital period in years.

Return type:

float

property L2_dist_AU: float#

Sun-L2 distance in AU.

Return type:

float

_halo_time(mjd)[source]#

Convert MJD to periodic halo time in years.

Parameters:

mjd (float)

Return type:

float

position_ecliptic(mjd)[source]#

Heliocentric ecliptic position of the telescope at time mjd.

Parameters:

mjd (float) – Modified Julian Date (scalar).

Returns:

Position vector in heliocentric ecliptic frame (AU), shape (3,).

Return type:

jax.numpy.ndarray

sun_angle(mjd, ra_rad, dec_rad)[source]#

Angular separation between Sun and target as seen from the telescope.

Parameters:
  • mjd (float) – Modified Julian Date.

  • ra_rad (float) – Target right ascension in radians.

  • dec_rad (float) – Target declination in radians.

Returns:

Angular separation in radians.

Return type:

float

solar_elongation_deg(mjd, ra_rad, dec_rad)[source]#

3D solar elongation in degrees.

Identical to sun_angle() converted to degrees. This is the angular distance between the Sun and target as seen from the observer, NOT the Leinert helio-ecliptic longitude difference Delta_lambda_sun. For the latter use helio_ecliptic_longitude_deg().

Parameters:
  • mjd (float) – Modified Julian Date.

  • ra_rad (float) – Target right ascension in radians.

  • dec_rad (float) – Target declination in radians.

Returns:

Solar elongation in degrees, [0, 180].

Return type:

float

helio_ecliptic_longitude_deg(mjd, ra_rad, dec_rad)[source]#

Helio-ecliptic longitude difference |lambda_target - lambda_sun|.

This is the Leinert+1998 Delta_lambda_sun coordinate used to index Table 17 (together with ecliptic latitude). It is the absolute difference between the target’s ecliptic longitude and the Sun’s apparent ecliptic longitude (as seen from the observer, which is parallax-negligible for distant targets), wrapped onto [0, 180] deg.

For ecliptic-plane targets this equals the 3D solar elongation; for high-latitude targets the two diverge – only this quantity is correct as the Leinert table lookup.

Parameters:
  • mjd (float) – Modified Julian Date.

  • ra_rad (float) – Target right ascension in radians.

  • dec_rad (float) – Target declination in radians.

Returns:

|lambda_target - lambda_sun| in degrees, [0, 180].

Return type:

float

ecliptic_latitude_deg(mjd, ra_rad, dec_rad)[source]#

Target ecliptic latitude in degrees.

Argument order matches sun_angle(), solar_elongation_deg(), and helio_ecliptic_longitude_deg() so the four geometry helpers are interchangeable at call sites.

Parameters:
  • mjd (float) – Modified Julian Date (used for obliquity at this epoch).

  • ra_rad (float) – Target right ascension in radians.

  • dec_rad (float) – Target declination in radians.

Returns:

Ecliptic latitude in degrees, [-90, 90].

Return type:

float