Skip to content

Commit

Permalink
Leftover from removing require_spec and min_skies
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Aug 12, 2023
1 parent c746cb4 commit 306b355
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions src/gort/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ async def acquire(self, guide_tolerance: float = 3, timeout: float = 180):
# TODO: we need to stop guiders that timed out.

try:
n_skies_guiding = 0
for ii, tel in enumerate(guide_on_telescopes):
is_guiding = guide_status[ii][0]
if tel == "sci" and not is_guiding:
Expand All @@ -194,24 +193,12 @@ async def acquire(self, guide_tolerance: float = 3, timeout: float = 180):
error_code=801,
)
if tel == "spec" and not is_guiding:
if require_spec:
raise GortObserverError(
"Spec telescope is not guiding.",
error_code=801,
)
else:
self.write_to_log("Spec telescope is not guiding", "warning")
if "sky" in tel:
if is_guiding:
n_skies_guiding += 1
else:
self.write_to_log(f"{tel} telescope is not guiding.", "warning")

if n_skies_guiding < min_skies:
raise GortObserverError(
"Not enough sky telescopes guiding.",
error_code=801,
)
raise GortObserverError(
"Spec telescope is not guiding.",
error_code=801,
)
if "sky" in tel and not is_guiding:
self.write_to_log(f"{tel} telescope is not guiding.", "warning")

except Exception:
self.write_to_log("Stopping guide loops.", "warning")
Expand Down

0 comments on commit 306b355

Please sign in to comment.