across.tools.visibility.constraints.daytime

Classes

DaytimeConstraint

Constraint that avoids daytime observations based on twilight definitions.

Module Contents

class DaytimeConstraint(/, **data)[source]

Bases: across.tools.visibility.constraints.base.ConstraintABC

Constraint that avoids daytime observations based on twilight definitions.

For ground-based telescopes, daytime is defined by the Sun’s position relative to the horizon. Different twilight types provide different levels of darkness.

For space-based telescopes, daytime refers to periods when the spacecraft is in direct sunlight (requires appropriate ephemeris data).

The telescope type (ground vs space) is automatically detected based on the ephemeris type: GroundEphemeris for ground-based, all others for space-based.

Parameters:

twilight_type (TwilightType) – The type of twilight to use for defining daytime boundaries. - ‘astronomical’: Sun 12-18° below horizon (default) - ‘nautical’: Sun 6-12° below horizon - ‘civil’: Sun 0-6° below horizon - ‘day’: Sun above horizon

__call__(time, ephemeris, coordinate)[source]

Checks if the observation time qualifies as daytime for the given constraints.

name: Literal[across.tools.core.enums.ConstraintType.DAYTIME][source]
short_name: Literal['Daytime'] = 'Daytime'[source]
twilight_type: across.tools.core.enums.TwilightType = None[source]
__call__(time, ephemeris, coordinate)[source]

Check if the observation time is during daytime.

Parameters:
  • time (Time) – The time of observation.

  • ephemeris (Ephemeris) – The ephemeris (used for Earth location and potentially sunlight data).

  • coordinate (SkyCoord) – The coordinate (not used for daytime calculations).

Returns:

Boolean array where True indicates daytime (constraint violated).

Return type:

npt.NDArray[np.bool_]

_check_ground_daytime(time, ephemeris)[source]

Check daytime for ground-based telescopes using Sun altitude.

_check_space_daytime(time, ephemeris)[source]

Check daytime for space-based telescopes using proper eclipse calculations.

Determines if the spacecraft is in direct sunlight by calculating whether the Earth is blocking the line of sight to the Sun, accounting for the finite sizes of both Earth and Sun.