-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weather fixes #513
Weather fixes #513
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #513 +/- ##
===========================================
- Coverage 55.81% 55.76% -0.05%
===========================================
Files 60 60
Lines 3967 3972 +5
Branches 411 412 +1
===========================================
+ Hits 2214 2215 +1
- Misses 1653 1657 +4
Partials 100 100
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've asked something like the comment below before but you said it can't get into the take darks state without closing the dome so maybe there is not need for it.
src/huntsman/pocs/observatory.py
Outdated
@@ -501,8 +501,8 @@ def take_dark_observation(self, bias=False, **kwargs): | |||
ObsClass = BiasObservation if bias else DarkObservation | |||
observation = ObsClass(position=position) | |||
|
|||
# Dark observations don't care if it's dark or not | |||
safety_kwargs = {"ignore": ["is_dark"]} | |||
# Dark observations don't care if it's dark or not, or if bad weather |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Dark observations don't care if it's dark or not, or if bad weather | |
# Dark observations don't care if it's dark or not, or if bad weather | |
if not self.dome.is_closed: | |
self.dome.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm good point. Or to be flexible, we could just add the is_good_weather
to the list of ones to ignore if the dome is already closed. This would allow someone (for whatever reason) to take darks with the dome open.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking this is good enough for now:
# Dark observations don't care if it's dark or not
safety_kwargs = {"ignore": ["is_dark"]}
# Can ignore weather safety if dome is closed
with suppress(AttributeError):
if self.dome.is_closed:
safety_kwargs["ignore"].append("good_weather")
If there is no dome attribute then we should be in a fail safe mode and check for weather safety. This should work fine if using a simulated dome, but if not then it is a bug with the dome simulator.
Closes #495
Might close #506, need to check