Skip to content

Commit

Permalink
Change datetime to astropy.time
Browse files Browse the repository at this point in the history
  • Loading branch information
pgriffin17 committed Jan 9, 2024
1 parent 2bf796d commit 614a7bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyscope/observatory/ascom_camera.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions pyscope/observatory/maxim.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 614a7bd

Please sign in to comment.