across.tools.visibility.constraints.solar_system
Classes
Constraint that avoids observing too close to bright Solar System objects. |
Module Contents
- class SolarSystemConstraint(/, **data)[source]
Bases:
across.tools.visibility.constraints.base.ConstraintABCConstraint that avoids observing too close to bright Solar System objects.
Planets and other bright Solar System objects can contaminate observations or cause detector issues. This constraint ensures observations avoid these objects by maintaining sufficient angular separation.
- Parameters:
min_separation (float) – Minimum angular separation (degrees) required from Solar System objects. Observations closer than this will be constrained.
bodies (list[str]) – List of Solar System bodies to avoid. Defaults to major planets. Options include: ‘mercury’, ‘venus’, ‘mars’, ‘jupiter’, ‘saturn’, ‘uranus’, ‘neptune’.
- __call__(time, ephemeris, coordinate)[source]
Checks if the coordinate is too close to any Solar System object.
- bodies: list[across.tools.core.enums.SolarSystemObject | str] = None[source]
- classmethod validate_bodies(v)[source]
Validate that bodies is a list of SolarSystemObject or strings that match SolarSystemObject enum (case insensitive).
- _calculate_body_magnitude(body_name, body_coord, ephemeris, i)[source]
Calculate the apparent magnitude of a solar system body.
- Parameters:
body_name (SolarSystemObject | str) – Name of the body (‘moon’, ‘venus’, etc.)
body_coord (SkyCoord) – Position of the body
ephemeris (Ephemeris) – Ephemeris data
i (slice) – Slice for the time array
- Returns:
Apparent magnitude of the body
- Return type:
npt.NDArray[np.float64]
- __call__(time, ephemeris, coordinate)[source]
Check if the coordinate is too close to any Solar System object.
- Parameters:
time (Time) – The time of observation.
ephemeris (Ephemeris) – The ephemeris (used to get Earth location for body positions).
coordinate (SkyCoord) – The coordinate to check.
- Returns:
Boolean array where True indicates the coordinate violates the constraint (is too close to a Solar System object).
- Return type:
npt.NDArray[np.bool_]