-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Spectral extraction in Cubeviz with composite subsets #2837
Conversation
jdaviz/core/template_mixin.py
Outdated
'aperture_message': 'composite subsets are not supported', | ||
'aperture_message': 'composite subsets only support extraction ' | ||
'with aperture extraction method "center," and ' | ||
'without wavelength dependence', |
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.
can we instead consider these as valid and add support for showing the orange outline?
EDIT: ah, I see, we definitely want to set something so that this message is displayed in the plugin, and it probably should not be considered a valid aperture for other cases, but it would still be nice if we can visualize the aperture itself 🤔 . The fact that this is a reusable component, also means that we probably should not refer to spectral-extraction specifics in the message set by the component (since this will then also appear in aperture photometry, etc, which won't make any sense).
Removed the spectral extraction-specific aperture message in fbbdbd6, the UI warnings now looks like this: |
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.
The diff (minus the tests) is smaller than I expected, nice implementation. It didn't break when I tested and the code looks good to me.
I kicked the CI to see if Codecov will upload this time, that looked like a transient issue. |
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 suspect this will motivate some UI/UX changes when we get to reviewing the plugin as a whole, but agree that doesn't need to be in scope here. I'm still a bit torn on whether we should visualize the selection for this case (and if we don't under the argument that its not exact
, then perhaps we should also turn off the aperture visualization when the user turns off exact
? - but again, that can be considered later).
Thanks both! |
This PR introduces spectral extraction to cubeviz for composite subsets. The implementation converts the composite subset to a boolean mask, and applies it in the NDData collapse. The only supported aperture extraction method is "center," since this approach completely avoids the photutils pixel weighting methods.
cubeviz-spectral-extract-composite.mov
I've added a test that extracts two spectra from individual non-composite subsets, and compares their sum with the spectrum of a composite subset that spans the same area as both subsets combined.
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.