-
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
add spectral unit to moment map 0 display unit, simplify logic #3211
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 |
---|---|---|
|
@@ -2953,8 +2953,7 @@ def _get_continuum(self, dataset, spectral_subset, update_marks=False, per_pixel | |
if per_pixel: | ||
if self.app.config != 'cubeviz': | ||
raise ValueError("per-pixel only supported for cubeviz") | ||
full_spectrum = self.app._jdaviz_helper.get_data(self.dataset.selected, | ||
use_display_units=True) | ||
full_spectrum = self.app._jdaviz_helper.get_data(self.dataset.selected) | ||
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. is this (and the other removal below) because the marks are handling the unit conversion themselves? 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. yes i believe so (but also cc @bmorris3) . I also verified this change doesn't break anything in line analysis where this mixin is also used. 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. also see https://jira.stsci.edu/browse/JDAT-4830, this bug was not introduced with this change 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. see #3212 for the fix to moment map continuum previews during unit conversion. Whichever PR makes it in second should rebase and ensure that is still working as expected. |
||
else: | ||
full_spectrum = dataset.get_selected_spectrum(use_display_units=True) | ||
|
||
|
@@ -2978,8 +2977,7 @@ def _get_continuum(self, dataset, spectral_subset, update_marks=False, per_pixel | |
spectrum = full_spectrum | ||
else: | ||
sr = self.app.get_subsets(spectral_subset.selected, | ||
simplify_spectral=True, | ||
use_display_units=True) | ||
simplify_spectral=True) | ||
spectrum = extract_region(full_spectrum, sr, return_single_spectrum=True) | ||
sr_lower = np.nanmin(spectrum.spectral_axis[spectrum.spectral_axis >= sr.lower]) # noqa | ||
sr_upper = np.nanmax(spectrum.spectral_axis[spectrum.spectral_axis <= sr.upper]) # noqa | ||
|
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.
Some changes not carried over from #3116 for review:
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.