-
Notifications
You must be signed in to change notification settings - Fork 74
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
adjusting links to enable pixel, wavelength linking in specviz2d #2736
base: main
Are you sure you want to change the base?
Conversation
3117943
to
58df7bd
Compare
I was able to draw subset 1 on the spectrum viewer and subset 2 on the 2d viewer and they appear at the right locations, but the units for subset 2 show up as Looks like the reason for that is the Lines 943 to 945 in c731eef
|
I thought we had decided that was the intended behavior, at least for now until we have API support for requesting specific units? |
@kecnry Its not scientifically correct though right? Totally fine to push that change to a future PR, just something I noticed. Otherwise this PR is looking good! It works with editing the subsets and creating composite ones. There are enough error messages that a user shouldn't be surprised by the current units behavior so feel free to ignore that comment for now. |
ah, sorry, I missed the screenshot. Yes, it should show the actual wavelength values (along with wavelength units), but definitely not mixed with wavelength values and pixel units. If that is too difficult for now, then we can also return pixel values and units when the subset was first created in the 2d viewer. |
I meant to get back sooner I was deep in testing-land. μm, the unit is appearing in Subset Tools irregardless of what viewer the subset is drawn in. So the correct value is showing up independent of the viewer, but the units are always appearing in μm. In the case of the screenshot, if Subset 1 was drawn in the 1d viewer, and Subset 2d in the 2d viewer, are the values incorrect? |
Also, I split up the test into two temporarily. I'm going to have a look over the weekend. Drawing in 1d is working as expected for the test. Drawing in 2d, I am able to use the functionality in the test in a notebook, and it get the expected results. When I load the image from the spectrum in the test, the image is loading with 0s, and the shape of the image is not as it should be. |
Getting the spectral display units is not the right assumption here if the subsets can be returned in pixels, but if that was the behavior in main, then can probably be considered a follow-up effort (please create a ticket). |
|
||
# subset drawn in 1d viewer, want data in 2d viewer | ||
viewer_1d.apply_roi(XRangeROI(.0001, .0002)) | ||
subset_drawn_1d = viewer_2d.native_marks[-1].image |
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.
Getting the 3d image array this way is loading incorrectly only in the test. It should be (155, 864, 4) [which is how it loads in a Notebook], in the test file it is loading a zero array of shape (10,10,4), so the test thinks there's no mask. This is the last hold up.
Will do right now! |
fb41d35
to
931d4b7
Compare
931d4b7
to
4c87024
Compare
Do you have an idea of why the python 3.11 CI test is failing? |
Looks like this patch broke unit handling somewhere.
|
The dev tests are failing everywhere and we have a tech debt ticket to fix that ASAP 🐱 |
It is not a devdeps job. But it does pull in remote data. |
Are you saying this is affecting main? I restarted an old successful job on main from an hour ago. Let's see. https://github.com/spacetelescope/jdaviz/actions/runs/8286222588 |
I thought it was affecting other PRs, but maybe not, I do see it passing on others. And since its specviz2d spectral extraction, the bug could be here... |
The job on main still passes, so I think failure is related to this PR and cannot be ignored. |
I am going through it now with my env set to 3.11 |
This pull request is to address subset linking in specviz2d 🐱.
Description:
some combination of the specviz2d wavelength axis and unit conversion work seems to have broken the handling of subsets between the 1d and 2d viewers. If a subset is drawn in the 2d viewer and displayed in the subset plugin, the units are still reported as in wavelength units, which might be the reason they are not correctly translated onto the 1d viewer.
Validation Needed:
If a subset is created in the 2d viewer, is it translated correctly to the 1d (and vis versa)?
Bug Behavior:
Screen.Recording.2024-03-01.at.3.08.53.PM.mov
Updated Behavior 1 (Subset Tools in µm irregardless of which viewer subset is created in):
Screen.Recording.2024-03-01.at.3.00.28.PM.mov
Mosviz Behavior on Main:
Screen.Recording.2024-03-08.at.12.11.52.AM.mov
Mosviz Updated Behavior:
Screen.Recording.2024-03-08.at.12.16.32.AM.mov
Follow up:
Subset Tools for Mosviz, display units and values currently not displaying in plugin tab for subsets drawn in either viewer.
🐱
Drawing a subset in 2d viewer not displaying in either Mosviz Viewer in Mosviz.
🐱
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.