From 614a7bdd62eddacac5bcbd0e8c3d759937606ef4 Mon Sep 17 00:00:00 2001 From: pgriffin17 <31374077+pgriffin17@users.noreply.github.com> Date: Tue, 9 Jan 2024 08:08:19 -0600 Subject: [PATCH] Change datetime to astropy.time --- pyscope/observatory/ascom_camera.py | 4 ++-- pyscope/observatory/maxim.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pyscope/observatory/ascom_camera.py b/pyscope/observatory/ascom_camera.py index 79145838..f01eec37 100644 --- a/pyscope/observatory/ascom_camera.py +++ b/pyscope/observatory/ascom_camera.py @@ -1,7 +1,7 @@ import logging -from datetime import datetime as dt import numpy as np +from astropy.time import Time from .ascom_device import ASCOMDevice from .camera import Camera @@ -65,7 +65,7 @@ def PulseGuide(self, Direction, Duration): def StartExposure(self, Duration, Light): logger.debug(f"ASCOMCamera.StartExposure({Duration}, {Light}) called") self._last_exposure_duration = Duration - self._last_exposure_start_time = str(dt.utcnow()) + self._last_exposure_start_time = str(Time.now()) self._device.StartExposure(Duration, Light) def StopExposure(self): diff --git a/pyscope/observatory/maxim.py b/pyscope/observatory/maxim.py index 1341b090..3fa703f9 100755 --- a/pyscope/observatory/maxim.py +++ b/pyscope/observatory/maxim.py @@ -1,7 +1,8 @@ import logging import platform import time -from datetime import datetime as dt + +from astropy.time import Time from .autofocus import Autofocus from .camera import Camera @@ -125,7 +126,7 @@ def PulseGuide(self, Direction, Duration): def StartExposure(self, Duration, Light): logger.debug(f"StartExposure called with Duration={Duration}, Light={Light}") self._last_exposure_duration = Duration - self._last_exposure_start_time = str(dt.utcnow()) + self._last_exposure_start_time = str(Time.now()) self._com_object.Expose(Duration, Light) def StopExposure(self):