-
Notifications
You must be signed in to change notification settings - Fork 107
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
HotFix: SkyRegions GUI #1718
HotFix: SkyRegions GUI #1718
Conversation
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.
One minor suggestion, but it looks good otherwise. This touches a core function, so should we run tests?
pypeit/core/gui/skysub_regions.py
Outdated
else: | ||
# Build the master Sky Regions calibration frame | ||
msskyreg = buildimage.SkyRegions(image=inmask.astype(float), PYP_SPEC=self.spectrograph) | ||
return msskyreg |
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 this is a bit clearer:
if not self._use_updates:
return None
# Generate the mask
inmask = skysub.generate_mask(self.pypeline, self._skyreg, self.slits, self.slits_left,
self.slits_right)
if np.all(np.logical_not(inmask)):
msgs.warn("Sky regions are empty - master calibration frame will not be generated")
return None
# Build the master Sky Regions calibration frame
return buildimage.SkyRegions(image=inmask.astype(float), PYP_SPEC=self.spectrograph)
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.
Agreed - I've made that change!
Yes, we probably should - running now... |
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.
all good, modulo the master
bit
time to scrub that from our past :)
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## develop #1718 +/- ##
===========================================
- Coverage 41.04% 41.03% -0.01%
===========================================
Files 190 190
Lines 43714 43724 +10
===========================================
+ Hits 17941 17942 +1
- Misses 25773 25782 +9
|
This hotfix ensures that the calib key/dir/ID are all stored in the SkyRegions calibrations file. Several errors and bits of code cleanup are also implemented.