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

BUG: Cubeviz coordinate display should follow top visible layer #1445

Merged
merged 2 commits into from
Jul 6, 2022

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Jul 4, 2022

Description

Coordinate display for Cubeviz was added in #1315 . But without this patch, when multiple dataset are loaded into an image viewer, it shows the info from the bottommost layer, not topmost. This is the most apparent when you load a moment map (it currently has no WCS) on top of the flux cube in the flux viewer. You see the moment map displayed but the coordinate display would still show WCS from the flux cube. With this patch, coordinate display will now show correctly.

This was discovered during my investigation of another bug in #1328 .

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.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a change log needed? If yes, is it added to CHANGES.rst?
  • Is a milestone set?
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)? 🐱

@pllim pllim added the bug Something isn't working label Jul 4, 2022
@pllim pllim added this to the 2.7 milestone Jul 4, 2022
@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #1445 (2a00fce) into main (050b62d) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1445      +/-   ##
==========================================
+ Coverage   85.16%   85.20%   +0.03%     
==========================================
  Files          91       91              
  Lines        8359     8360       +1     
==========================================
+ Hits         7119     7123       +4     
+ Misses       1240     1237       -3     
Impacted Files Coverage Δ
...configs/cubeviz/plugins/moment_maps/moment_maps.py 94.00% <ø> (ø)
jdaviz/configs/cubeviz/plugins/viewers.py 88.65% <100.00%> (+3.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 050b62d...2a00fce. Read the comment docs.

@pllim pllim marked this pull request as ready for review July 4, 2022 19:26
Copy link
Collaborator

@rosteen rosteen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it would be nice to have the WCS information attached to the result but that's a separate ticket, agreed that this is how it should work here.

@pllim
Copy link
Contributor Author

pllim commented Jul 6, 2022

it would be nice to have the WCS information attached to the result but that's a separate ticket

Indeed but doesn't appear trivial. It might be a fox hole. See #1025

@kecnry
Copy link
Member

kecnry commented Jul 6, 2022

I rebased locally on top of #1400 (merged into main since this PR was opened)... what is the expected behavior when you have a moment map as contours only on top of a cube? Currently it sees the moment map as the top layer and shows those coordinates (which might be the expected/desired behavior, but I could also see the argument that this should display the top image layer).

EDIT: whatever the decision, I think the behavior should be consistent between imviz and cubeviz. If the current behavior is intentional or we want to push a possible change to future effort, then I can approve and we can get this in.

image

@pllim
Copy link
Contributor Author

pllim commented Jul 6, 2022

what is the expected behavior when you have a moment map as contours only on top of a cube?

This is the problem of applying features from other viz tools that do not allow multiple layers/opacities combo. We are faced with this same question in Imviz too. Also, same problem with showing "top image" label.

I do not know the answer.

Copy link
Member

@kecnry kecnry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's defer a decision on handling contours (opened #1458). This is currently consistent with imviz and fixes the immediate bug.

@kecnry kecnry merged commit 8f363e5 into spacetelescope:main Jul 6, 2022
@pllim pllim deleted the cubeviz-moar-fixes branch July 6, 2022 16:49
@pllim
Copy link
Contributor Author

pllim commented Jul 6, 2022

Thanks for the reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants