Skip to content

Commit

Permalink
Add Exposure.start_time
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jul 27, 2023
1 parent 66af55c commit 0d42bed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gort/devices/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import jsonschema
import pandas
from astropy.time import Time
from rich.progress import BarColumn, MofNCompleteColumn, Progress, TextColumn

from sdsstools.time import get_sjd
Expand Down Expand Up @@ -64,6 +65,7 @@ def __init__(self, exp_no: int, spec_set: SpectrographSet, flavour: str = "objec
self.exp_no = exp_no
self.flavour = flavour
self.object: str = ""
self.start_time = Time.now()

self.error: bool = False
self.reading: bool = False
Expand Down Expand Up @@ -150,6 +152,8 @@ async def expose(
guider_task = None

try:
self.start_time = Time.now()

await self.spec_set._send_command_all(
"expose",
exposure_time=exposure_time,
Expand Down Expand Up @@ -341,7 +345,7 @@ async def register_observation(
registration_payload = {
"dither": dither_pos,
"tile_id": tile_id or -999,
"jd": 0,
"jd": self.start_time.jd,
"seeing": seeing,
"standards": [],
"skies": [],
Expand Down

0 comments on commit 0d42bed

Please sign in to comment.