Source code for pyobs.interfaces.IFocusModel

from abc import ABCMeta, abstractmethod
from dataclasses import dataclass, field
from typing import Any

from ..utils.time import Time
from .interface import Interface


[docs] @dataclass class OptimalFocusState: focus: float time: Time = field(default_factory=Time.now)
class IFocusModel(Interface, metaclass=ABCMeta): """The module provides a model for the telescope focus, e.g. based on temperatures.""" __module__ = "pyobs.interfaces" state = OptimalFocusState
[docs] @abstractmethod async def set_optimal_focus(self, **kwargs: Any) -> None: """Sets optimal focus. Raises: WeatherDataError: If the weather station returned an invalid temperature reading. FocusTimeoutError: If a temperature module didn't respond in time. MissingSensorError: If a configured sensor isn't in a module's temperature data. """ ...
__all__ = ["IFocusModel"]