From 7f50614d4a85c9b3606e04996559f5683385c9ab Mon Sep 17 00:00:00 2001 From: Tim-Oliver Husser Date: Mon, 11 Dec 2023 10:34:22 +0100 Subject: [PATCH] Adding CameraSettings to AutoGuiding --- pyobs/modules/pointing/autoguiding.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyobs/modules/pointing/autoguiding.py b/pyobs/modules/pointing/autoguiding.py index d52694b1..f67e15a8 100644 --- a/pyobs/modules/pointing/autoguiding.py +++ b/pyobs/modules/pointing/autoguiding.py @@ -2,6 +2,7 @@ import logging from typing import Any, Optional +from pyobs.mixins import CameraSettingsMixin from pyobs.modules.pointing._baseguiding import BaseGuiding from pyobs.images.meta.exptime import ExpTime from pyobs.images.processors.detection import SepSourceDetection @@ -12,7 +13,7 @@ log = logging.getLogger(__name__) -class AutoGuiding(BaseGuiding): +class AutoGuiding(BaseGuiding, CameraSettingsMixin): """An auto-guiding system.""" __module__ = "pyobs.modules.guiding" @@ -32,6 +33,9 @@ def __init__(self, exposure_time: float = 1.0, broadcast: bool = False, **kwargs self._broadcast = broadcast self._source_detection = SepSourceDetection() + # init camera settings mixin + CameraSettingsMixin.__init__(self, **kwargs) + # add thread func self.add_background_task(self._auto_guiding) @@ -81,6 +85,9 @@ async def _auto_guiding(self) -> None: # get camera camera = await self.proxy(self._camera, IData) + # do camera settings + await self._do_camera_settings(camera) + # take image if isinstance(camera, IExposureTime): # set exposure time