-
Notifications
You must be signed in to change notification settings - Fork 76
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
Extract on SubsetCreateMessage #3238
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -263,6 +263,7 @@ def _aperture_items_changed(self, msg): | |||||||||||
self._extract_in_new_instance(subset_lbl=subset_lbl, | ||||||||||||
auto_update=True, add_data=True) | ||||||||||||
except Exception: | ||||||||||||
raise | ||||||||||||
msg = SnackbarMessage( | ||||||||||||
f"Automatic {self.resulting_product_name} extraction for {subset_lbl} failed", # noqa | ||||||||||||
color='error', sender=self, timeout=10000) | ||||||||||||
|
@@ -458,9 +459,14 @@ def _extract_from_aperture(self, cube, uncert_cube, mask_cube, aperture, | |||||||||||
subset_id=aperture.selected, cls=NDDataArray | ||||||||||||
) | ||||||||||||
if uncert_cube: | ||||||||||||
uncertainties = uncert_cube.get_subset_object( | ||||||||||||
subset_id=aperture.selected, cls=StdDevUncertainty | ||||||||||||
) | ||||||||||||
try: | ||||||||||||
# Subset may not be linked to the uncertainty cube at this point?? | ||||||||||||
uncertainties = uncert_cube.get_subset_object( | ||||||||||||
subset_id=aperture.selected, cls=StdDevUncertainty | ||||||||||||
) | ||||||||||||
except ValueError: | ||||||||||||
raise | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This would at least let the subset propagate to the spectral extraction tool, even if uncertainties are (initially) missing. I'd expect them to be available after the first modification (move/resize) to the subset, since I don't see the snackbar message repeated then, but could not find anything where |
||||||||||||
uncertainties = None | ||||||||||||
else: | ||||||||||||
uncertainties = None | ||||||||||||
|
||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2005,6 +2005,8 @@ def __init__(self, plugin, items, selected, multiselect=None, selected_has_subre | |
|
||
self.hub.subscribe(self, SubsetUpdateMessage, | ||
handler=lambda msg: self._update_subset(msg.subset, msg.attribute)) | ||
self.hub.subscribe(self, SubsetCreateMessage, | ||
handler=lambda msg: self._update_subset(msg.subset)) | ||
Comment on lines
+2008
to
+2009
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hoped that I could just replace the trigger for this from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably cannot work as a drop-in replacement since |
||
self.hub.subscribe(self, SubsetDeleteMessage, | ||
handler=lambda msg: self._delete_subset(msg.subset)) | ||
self.hub.subscribe(self, SubsetRenameMessage, | ||
|
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.
This is here for debugging to expose the error.