Skip to content

Commit

Permalink
Fix setting the metadata of the previous standard when acquiring the …
Browse files Browse the repository at this point in the history
…next one
  • Loading branch information
albireox committed Jul 22, 2024
1 parent 94cf8f5 commit f957c40
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/gort/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,11 +772,6 @@ async def acquire_standard(self, standard_idx: int):
spec_tel = self.gort.telescopes.spec
await spec_tel.fibsel.move_relative(500)

# Register the previous standard.
if self.standards[self.current_standard].acquired:
self.standards[self.current_standard].t1 = time()
self.standards[self.current_standard].observed = True

overhead_root = f"standards:standard-{self.current_standard}"

# New coordinates to observe.
Expand Down Expand Up @@ -926,7 +921,12 @@ async def _iterate(self, exposure_time: float):
if len(spec_coords) == current_std_idx + 1:
continue

# Increase current index and get coordinates.
# Register the previous standard.
if self.standards[self.current_standard].acquired:
self.standards[self.current_standard].t1 = time()
self.standards[self.current_standard].observed = True

# Increase current index and acquire the next standard.
current_std_idx += 1
self.current_standard += 1

Expand Down

0 comments on commit f957c40

Please sign in to comment.