Skip to content
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

get_subsets doesn't return sky_region for composite subset created with 'remove'[BUG] #2570

Open
cshanahan1 opened this issue Nov 17, 2023 · 2 comments
Labels
bug Something isn't working needs-triage Issue opened via template and needs triaging

Comments

@cshanahan1
Copy link
Contributor

cshanahan1 commented Nov 17, 2023

Jdaviz component

Imviz

Description

I noticed this issue when working on bmorris3#19, which displays sky coordinates and allows editing in sky coordinates when WCS linked. If you create a composite subset with the 'remove' mode, the 'remove' sub-subset does not have a parent.coords so it doesn't have a WCS, and get_subsets(include_sky_region=True) returns None for sky_region. This creates issues when you're trying to display editable sky coordinates for that subset in the subset_plugin in my PR.

Screen Shot 2023-11-17 at 1 05 45 PM

How to Reproduce

Create a composite subset using 'remove' mode on a dataset with a valid WCS (e.g imviz example notebook), run app.get_subsets(include_sky_region=True), and you will see that for the 'remove' component there is no WCS.

@cshanahan1 cshanahan1 added bug Something isn't working needs-triage Issue opened via template and needs triaging labels Nov 17, 2023
@pllim
Copy link
Contributor

pllim commented Nov 17, 2023

Sounds like whatever logic was added in #2496 missed this combo?

@pllim
Copy link
Contributor

pllim commented Nov 17, 2023

It might have entered this block and there is no sky conversion done here?

jdaviz/jdaviz/app.py

Lines 1174 to 1178 in ac3078a

if isinstance(two, list):
two[0]['glue_state'] = "AndNotState"
# Return two first so that we preserve the chronology of how
# subset regions are applied.
return one + two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue opened via template and needs triaging
Projects
None yet
Development

No branches or pull requests

2 participants