Telescopes (pyobs.modules.telescope)
Modules for telescopes. TODO: write doc
BaseTelescope
- class BaseTelescope(fits_headers: dict[str, Any] | None = None, min_altitude: float = 10, wait_for_dome: str | None = None, **kwargs: Any)
Bases:
WeatherAwareMixin,MotionStatusMixin,WaitForMotionMixin,ITelescope,IFitsHeaderBefore,ModuleBase class for telescopes.
Initialize a new base telescope.
- Parameters:
fits_headers – Additional FITS headers to send.
min_altitude – Minimal altitude for telescope.
wait_for_dome – Name of dome module to wait for.
- async get_fits_header_before(namespaces: list[str] | None = None, **kwargs: Any) dict[str, FitsHeaderEntry][source]
Returns FITS header for the current status of this module.
- Parameters:
namespaces – If given, only return FITS headers for the given namespaces.
- Returns:
Dictionary containing FITS headers.
- async move_altaz(alt: float, az: float, **kwargs: Any) None[source]
Moves to given coordinates.
- Parameters:
alt – Alt in deg to move to.
az – Az in deg to move to.
- Raises:
NotSupportedError – If this telescope doesn’t support Alt/Az pointing.
AltitudeLimitError – If the destination is below the configured altitude limit.
MoveError – If telescope cannot be moved.
- async move_radec(ra: float, dec: float, **kwargs: Any) None[source]
Starts tracking on given coordinates.
- Parameters:
ra – RA in deg to track.
dec – Dec in deg to track.
- Raises:
NotSupportedError – If this telescope doesn’t support RA/Dec pointing.
MissingObserverError – If no observer is configured.
AltitudeLimitError – If the destination is below the configured altitude limit.
MoveError – If telescope cannot be moved.
- async set_tracking_rate(ra_rate: float, dec_rate: float, **kwargs: Any) None[source]
Public entry point for external/manual callers. Enforces the SIDEREAL precondition: a continuous rate is only ever meaningful as a small correction on top of sidereal motion, never on top of OFF – see design doc’s “Required base mode” section.
- Parameters:
ra_rate – Rate in RA, arcsec/sec on the sky.
dec_rate – Rate in Dec, arcsec/sec on the sky.
- Raises:
MoveError – If rate could not be set.
- async track_body(body: str, **kwargs: Any) None[source]
Starts tracking a named solar-system body.
- Parameters:
body – Name resolvable to an ephemeris (e.g. ‘moon’, ‘mars’, ‘jupiter’, or an asteroid/comet designation known to JPL Horizons).
- Raises:
NotSupportedError – If this telescope doesn’t support body tracking.
MoveError – If telescope could not be moved.
BodyResolutionError – If body name is not resolvable.
- async track_orbital_elements(elements: OrbitalElements, **kwargs: Any) None[source]
Starts tracking a body defined by orbital elements.
- Parameters:
elements – Orbital elements of the body to track.
- Raises:
NotSupportedError – If this telescope doesn’t support orbital-element tracking.
MoveError – If telescope could not be moved.
InvalidOrbitalElementsError – If elements are incomplete (neither mean_anomaly nor perihelion_time given).
DummyRaDecTelescope
- class DummyRaDecTelescope(offsets: tuple[float, float] | None = None, **kwargs: Any)
Bases:
_DummyTelescopeBase,IOffsetsRaDec,IPointingBody,IPointingOrbitalElementsA dummy equatorial-mount telescope for testing, offering RA/Dec offsets.
Creates a new dummy RA/Dec telescope.
- Parameters:
offsets – Initial RA/Dec offsets in degrees.
- property real_pos: SkyCoord
Current position including offsets and drift.
DummyAltAzTelescope
- class DummyAltAzTelescope(offsets: tuple[float, float] | None = None, **kwargs: Any)
Bases:
_DummyTelescopeBase,IOffsetsAltAz,IPointingBody,IPointingOrbitalElementsA dummy alt/az-offset telescope for testing, offering Alt/Az offsets.
Creates a new dummy Alt/Az telescope.
- Parameters:
offsets – Initial Alt/Az offsets in degrees.
DummySolarTelescope
- class DummySolarTelescope(**kwargs: Any)
Bases:
_DummyTelescopeBase,IPointingHeliocentricPolar,IPointingHeliographicStonyhurst,IPointingHelioprojectiveA dummy telescope dedicated to solar pointing (Heliocentric Polar/Heliographic Stonyhurst/ Helioprojective), for testing – it always tracks the Sun and does not support arbitrary body/orbital-element tracking (see dummy-telescope-split-design.md).
Creates a new dummy telescope.
- Parameters:
position – Initial RA/Dec position in degrees.
pointing_offset – Pointing offset in RA/Dec in arcsecs.
move_accuracy – Accuracy of movements in arcsec (random error after any movement).
speed – Speed of telescope in deg/sec.
focus – Initial focus value.
filters – List of available filters.
filter_name – Initial filter name.
drift – RA/Dec drift in arcsec/sec.
focal_length – Focal length in mm.
wait_secs – Wait time between slew checks in seconds.
- async move_altaz(alt: float, az: float, **kwargs: Any) None[source]
Moves to given coordinates.
- Parameters:
alt – Alt in deg to move to.
az – Az in deg to move to.
- Raises:
NotSupportedError – If this telescope doesn’t support Alt/Az pointing.
AltitudeLimitError – If the destination is below the configured altitude limit.
MoveError – If telescope cannot be moved.
- async move_heliocentric_polar(mu: float, psi: float, **kwargs: Any) None[source]
Moves to and continuously tracks a Heliocentric Polar (mu, psi) coordinate.
- async move_heliographic_stonyhurst(lon: float, lat: float, **kwargs: Any) None[source]
Moves to and continuously tracks a Heliographic Stonyhurst (lon, lat) coordinate.
- async move_helioprojective(theta_x: float, theta_y: float, **kwargs: Any) None[source]
Moves to and continuously tracks a Helioprojective (theta_x, theta_y) coordinate.
- async move_radec(ra: float, dec: float, **kwargs: Any) None[source]
Starts tracking on given coordinates.
- Parameters:
ra – RA in deg to track.
dec – Dec in deg to track.
- Raises:
NotSupportedError – If this telescope doesn’t support RA/Dec pointing.
MissingObserverError – If no observer is configured.
AltitudeLimitError – If the destination is below the configured altitude limit.
MoveError – If telescope cannot be moved.