<gh_stars>1-10
from typing import Tuple

from .IAbortable import IAbortable


class IAutoFocus(IAbortable):
    """The module can perform an auto-focus."""
    __module__ = 'pyobs.interfaces'

    def auto_focus(self, count: int, step: float, exposure_time: int, *args, **kwargs) -> Tuple[float, float]:
        """Perform an auto-focus series.

        This method performs an auto-focus series with "count" images on each side of the initial guess and the given
        step size. With count=3, step=1 and guess=10, this takes images at the following focus values:
        7, 8, 9, 10, 11, 12, 13

        Args:
            count: Number of images to take on each side of the initial guess. Should be an odd number.
            step: Step size.
            exposure_time: Exposure time for images.

        Returns:
            Tuple of obtained best focus value and its uncertainty.

        Raises:
            ValueError: If focus could not be obtained.
        """
        raise NotImplementedError

    def auto_focus_status(self, *args, **kwargs) -> dict:
        """Returns current status of auto focus.

        Returned dictionary contains a list of focus/fwhm pairs in X and Y direction.

        Returns:
            Dictionary with current status.
        """
        raise NotImplementedError


__all__ = ['IAutoFocus']

from typing import Tuple

from .IAbortable import IAbortable


class IAutoFocus(IAbortable):
    """The module can perform an auto-focus."""
    __module__ = 'pyobs.interfaces'

    def auto_focus(self, count: int, step: float, exposure_time: int, *args, **kwargs) -> Tuple[float, float]:
        """Perform an auto-focus series.

        This method performs an auto-focus series with "count" images on each side of the initial guess and the given
        step size. With count=3, step=1 and guess=10, this takes images at the following focus values:
        7, 8, 9, 10, 11, 12, 13

        Args:
            count: Number of images to take on each side of the initial guess. Should be an odd number.
            step: Step size.
            exposure_time: Exposure time for images.

        Returns:
            Tuple of obtained best focus value and its uncertainty.

        Raises:
            ValueError: If focus could not be obtained.
        """
        raise NotImplementedError

    def auto_focus_status(self, *args, **kwargs) -> dict:
        """Returns current status of auto focus.

        Returned dictionary contains a list of focus/fwhm pairs in X and Y direction.

        Returns:
            Dictionary with current status.
        """
        raise NotImplementedError


__all__ = ['IAutoFocus']
The module can perform an auto-focus. Perform an auto-focus series.          This method performs an auto-focus series with "count" images on each side of the initial guess and the given         step size. With count=3, step=1 and guess=10, this takes images at the following focus values:         7, 8, 9, 10, 11, 12, 13          Args:             count: Number of images to take on each side of the initial guess. Should be an odd number.             step: Step size.             exposure_time: Exposure time for images.          Returns:             Tuple of obtained best focus value and its uncertainty.          Raises:             ValueError: If focus could not be obtained. Returns current status of auto focus.          Returned dictionary contains a list of focus/fwhm pairs in X and Y direction.          Returns:             Dictionary with current status.