-
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
Virtual Observatory plugin for Jdaviz #2872
base: main
Are you sure you want to change the base?
Conversation
2cbe1d9
to
ab8ae95
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2872 +/- ##
==========================================
+ Coverage 88.91% 88.94% +0.02%
==========================================
Files 111 114 +3
Lines 17372 17542 +170
==========================================
+ Hits 15446 15602 +156
- Misses 1926 1940 +14 ☔ View full report in Codecov by Sentry. |
Hi @camipacifici! (Starting to move the conversation to GitHub) I'm starting to address your review comments, and specifically regarding your request to block data loading unless WCS linking is enabled, I think we're stuck in a catch-22: If there is no data loaded into Imviz, the orientation plugin actually locks the link type to Pixels only: This requirement currently effectively prevents users from using the VO plugin to load in their first data product (which I think is a usecase we have discussed wanting to support). With this consideration, the only solution I have is to load the data with Pixel linking, then immediately switch it to WCS linking. This does go against your request to block the user with a warning rather than doing it automatically. And if we add this one exception to when there's no data (immediately link WCS if there's no data, but block if there's preexisting data) then that creates inconsistent behavior. What do you think? |
Not quite sure if I follow here. If there is no data or only one data, there is no point in WCS linking (as there is nothing to link). If there is one or more prior data, then I think it is reasonable for the plugin to automatically toggle WCS linking as long as such a behavior is clearly documented. But that does not stop user form manually switching back to pixel linking afterwards. What is the objection of pixel linking anyway? |
I don't personally have one, but I'm following through with a request from @camipacifici to block users from loading VO data products unless WCS linking is enabled. Maybe Cami can provide insight to the requirement here? |
If there is no data at all, I agree that it does not matter. I am thinking more the case where the user has already loaded an image then looks in the VO plugin to find the same field from another telescope. If the image is loaded when linking is by pixel, the user could be confused because the images will not match. Personally, I would not automatically toggle WCS linking, but I would add an orange box that prompts the user to go toggle the linking to WCS. |
Sorry, I just reread your previous message. I do not want to block the user from loading data. I just want to warn them that they will not see the images aligned if they do not link by WCS. |
@camipacifici I just pushed up 10d712d which provides a warning when:
On point 2, I figured a warning about misaligned data would be nonsensical if there's only one dataset total (the one the user is loading). Give it a try and see if it's the behavior you're expecting. Thanks! |
Hi Cami, On the smaller points, I pushed up a change that should fix the "hanging" issue. I forcibly stopped the plugin whenever a load data error occurred, but forgot to properly clear the loading flag. Instead, now a load_data error should not stop the plugin; it will notify via snackbar message and then move on to other selected files. On the lack of linking error message, that one concerns me; let me explicitly spell out what conditions it should hit and you let me know which path you were in, or if you hit a case I'm not covering:
I have a test that checks for these conditions in CI, which is passing, so I'm concerned you may have found a scenario I'm not covering for. If you are in one of the above, could you detail what was in your data_collection when you tried to download from the VO, and were expecting the warning? Lastly, SkyView is down at the moment due to a storage system error so I'll test your other error message once it comes back online. Thanks! |
Hi Cami! Now that SkyView is back up I was able to start debugging your aforementioned issue. In short, I did get an error, but it was a download timeout error, not the
|
jdaviz/configs/default/plugins/virtual_observatory/vo_plugin.py
Outdated
Show resolved
Hide resolved
Hi @camipacifici! I've implemented basic versions of the two requests you had:
NOTE: I have a pyvo PR There are still nice-to-haves I'd like to add when I have a chance, such as detecting when the coordinates pulled are out of date (probably by changing the color of the centering icon), but hopefully this increment gives you enough to try out the behavior. Let me know your thoughts! |
Hi @camipacifici! Another quick update. So... I know we were concerned about the performance of auto-updating coordinates during pan-zoom, but I was curious and went ahead and implemented it anyways to see how it would perform. Surprisingly, it does quite well! Any lag I feel doesn't seem to get worse if I enable the "following" switch (alternatively, I don't see a lag improvement when I disable the toggle): Please try it out and see how it performs on your side! I feel like it massively improves the user experience in searching for coordinates, but if it doesn't work for you, I can always remove it. Thanks! |
Co-authored-by: Kyle Conroy <[email protected]>
Co-authored-by: Kyle Conroy <[email protected]>
Co-authored-by: Kyle Conroy <[email protected]>
Hi @rosteen! Thanks for your patience! I've rebased this PR to get it up to date, and it appears a few things have changed in the meantime:
Ok with that out of the way, I did take a look at your review comments!
ImvizExample.auto-Y._.2.-.JupyterLab.-.Brave.2025-02-03.15-22-58.mp4Thanks! |
Description
NOTE: This PR depends on https://github.com/astropy/pyvo/tree/main until it is released with the changes introduced in astropy/pyvo#594PyVO 1.5.3 has been released and the pin updated accordinglyThis PR introduces a new plugin to query resources and load data products published by collaborators of the International Virtual Observatory Alliance. This Plugin currently queries resources implementing the original 1.0 version of the Simple Image Access protocol by specifying a source and a waveband and loads the selected products into Imviz. Though currently only implemented into Imviz, I placed this plugin into the
default
config in hopes this plugin can be expanded to also work for Specviz via the Simple Spectrum Access Protocol, and Cubeviz as well. Documentation and Unit Tests have been implemented, and this is formally ready to review!Additionally, I placed the VO plugin closer to the top mainly for my own testing, but also because loading data generally occurs before data analysis. Feel free to adjust the location of the plugin within the plugin bar to your liking.
Thanks for your inputs/help getting us this far! We at the HEASARC hope this is a useful contribution to the Jdaviz tool and community :)
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.