-
Notifications
You must be signed in to change notification settings - Fork 79
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). |
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... |
4c87024
to
d614b93
Compare
905c49b
to
79b75c9
Compare
9dea850
to
540fa64
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2736 +/- ##
=======================================
Coverage 87.53% 87.53%
=======================================
Files 128 128
Lines 19957 19964 +7
=======================================
+ Hits 17469 17476 +7
Misses 2488 2488 ☔ View full report in Codecov by Sentry. |
@javerbukh is the the 1D spectrum auto-extracted from the 2d spectrum with the data you used or did you load the 1D and 2D separately using Do you mind sending me the MAST link or data that you were testing with? |
''' | ||
def test_draw1d_linking_specviz2d(specviz2d_helper): |
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 this commented out code be removed?
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.
That test is intentionally commented out for now until the SubsetCreateMessage PR is merged (which I believe we got an update this morning that it will be occurring soon). We should test that subsets created in either viewer loaded in the opposing viewer as well (but this at the moment is prevented with the Glue maxpin)
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 bug I was encountering was because I unsuccessfully loaded MAST data into the viewer (the URI would error and no data would be retrieved) and then tried to load local data using the import button without restarting the kernel. @gibsongreen is investigating this workflow but otherwise this works well!
This pull request is to address subset linking in specviz2d 🐱.
Description:
This update updates LinkSame to LinkSameWithUnits, and appropriate components depending on the spectrum dimensionality is handled so subsets load within the bounds of both viewers, irregardless of which they were created in, nor if additional data items are added to the data collection (eg. via Spectral Extraction Plugin).
These updates should also ensure that unit handling for subsets is occurring. Unit changes can be seen in the plugin.
Note:
specviz2d.app.get_subsets(use_display_units=True)
needs the use_display_units argument.Bug Behavior:
Screen.Recording.2024-03-01.at.3.08.53.PM.mov
Updated Behavior:
Screen.Recording.2025-02-04.at.9.46.05.AM.mov
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.