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: Fix click to center on multiple visible layers when linked by WCS #2750

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Mar 12, 2024

Description

Fixes #2749

Change log entry

  • Is a change log needed? If yes, is it added to 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, maintainer
    should 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.

  • 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 milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone. Bugfix milestone also needs an accompanying backport label.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)? 🐱

visible layers when linked by WCS.
@pllim pllim added bug Something isn't working no-changelog-entry-needed changelog bot directive Affects-dev changelog bot directive labels Mar 12, 2024
@pllim pllim added this to the 3.9 milestone Mar 12, 2024
@github-actions github-actions bot added imviz plugin Label for plugins common to multiple configurations labels Mar 12, 2024
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 88.68%. Comparing base (adda177) to head (9515b7a).
Report is 1 commits behind head on main.

Files Patch % Lines
jdaviz/configs/imviz/plugins/tools.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2750      +/-   ##
==========================================
+ Coverage   88.63%   88.68%   +0.05%     
==========================================
  Files         108      108              
  Lines       16210    16214       +4     
==========================================
+ Hits        14367    14379      +12     
+ Misses       1843     1835       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rosteen
Copy link
Collaborator

rosteen commented Mar 12, 2024

Looks like this fixed the issue, I'll give a real review/approval once it's ready.

@pllim

This comment was marked as resolved.

and I had proven that the test fails when linked by WCS without this patch
cur_cen = v._get_center_skycoord()
v.center_on(coo)
real_cen = v._get_center_skycoord()
assert_allclose(cur_cen.ra.deg, real_cen.ra.deg)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this patch, it would fail with this error here:

E           AssertionError:
E           Not equal to tolerance rtol=1e-07, atol=0
E
E           Mismatched elements: 1 / 1 (100%)
E           Max absolute difference: 0.00015008
E           Max relative difference: 7.58381226e-07
E            x: array(197.892778)
E            y: array(197.892628)

@pllim pllim marked this pull request as ready for review March 12, 2024 23:14
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.

This makes sense to me - thanks for the quick fix!

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!

@pllim pllim merged commit 30595ce into spacetelescope:main Mar 13, 2024
19 of 20 checks passed
@pllim pllim deleted the imviz-click-cen-wcs branch March 13, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects-dev changelog bot directive bug Something isn't working imviz no-changelog-entry-needed changelog bot directive plugin Label for plugins common to multiple configurations Ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Click-to-center broken when WCS-linked
3 participants