Loading noctua/devices/atik.py +13 −3 Original line number Diff line number Diff line Loading @@ -331,12 +331,21 @@ class Camera(BaseDevice): hdr['DATE-OBS'] = (str(self._last_datetime), "(UTC) Date the exposure was started") if bx.value > 1 or by.value > 1: # Binned readouts have been observed to report a stale # CCD-TEMP (a fixed 0.31C) right after ArtemisImageReady, # with ArtemisTemperatureSensorInfo still returning # ARTEMIS_OK -- the error-code check below can't catch it. # A short settle delay lets the driver's temperature cache # refresh before we read it. time.sleep(0.2) ccd_temp = ctypes.c_int() err = self._lib.ArtemisTemperatureSensorInfo(h, 1, ctypes.byref(ccd_temp)) if err != _ARTEMIS_OK: # Seen right after a binned exposure: the sensor query can # briefly fail before the driver has settled post-readout. # One retry is enough in practice. # Genuine SDK-reported failure (distinct from the stale-cache # case above): retry once after a short delay. time.sleep(0.2) err = self._lib.ArtemisTemperatureSensorInfo(h, 1, ctypes.byref(ccd_temp)) if err == _ARTEMIS_OK: hdr['CCD-TEMP'] = (ccd_temp.value / 100.0, "[C] CCD temperature") Loading Loading @@ -558,6 +567,7 @@ class Camera(BaseDevice): temp = ctypes.c_int() err = self._lib.ArtemisTemperatureSensorInfo(h, 1, ctypes.byref(temp)) if err != _ARTEMIS_OK: time.sleep(0.2) err = self._lib.ArtemisTemperatureSensorInfo(h, 1, ctypes.byref(temp)) if err != _ARTEMIS_OK: log.error(f"Atik: ArtemisTemperatureSensorInfo failed (error {err})") Loading Loading
noctua/devices/atik.py +13 −3 Original line number Diff line number Diff line Loading @@ -331,12 +331,21 @@ class Camera(BaseDevice): hdr['DATE-OBS'] = (str(self._last_datetime), "(UTC) Date the exposure was started") if bx.value > 1 or by.value > 1: # Binned readouts have been observed to report a stale # CCD-TEMP (a fixed 0.31C) right after ArtemisImageReady, # with ArtemisTemperatureSensorInfo still returning # ARTEMIS_OK -- the error-code check below can't catch it. # A short settle delay lets the driver's temperature cache # refresh before we read it. time.sleep(0.2) ccd_temp = ctypes.c_int() err = self._lib.ArtemisTemperatureSensorInfo(h, 1, ctypes.byref(ccd_temp)) if err != _ARTEMIS_OK: # Seen right after a binned exposure: the sensor query can # briefly fail before the driver has settled post-readout. # One retry is enough in practice. # Genuine SDK-reported failure (distinct from the stale-cache # case above): retry once after a short delay. time.sleep(0.2) err = self._lib.ArtemisTemperatureSensorInfo(h, 1, ctypes.byref(ccd_temp)) if err == _ARTEMIS_OK: hdr['CCD-TEMP'] = (ccd_temp.value / 100.0, "[C] CCD temperature") Loading Loading @@ -558,6 +567,7 @@ class Camera(BaseDevice): temp = ctypes.c_int() err = self._lib.ArtemisTemperatureSensorInfo(h, 1, ctypes.byref(temp)) if err != _ARTEMIS_OK: time.sleep(0.2) err = self._lib.ArtemisTemperatureSensorInfo(h, 1, ctypes.byref(temp)) if err != _ARTEMIS_OK: log.error(f"Atik: ArtemisTemperatureSensorInfo failed (error {err})") Loading