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

enable coords-info and markers plugin #22

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented May 26, 2023

This PR implements and enables both mouseover coordinates and the markers plugin (making use of the generalization in spacetelescope/jdaviz#2213 which has since been released and should be included with the pinned version of jdaviz). Unlike the implementation in specviz, the neareset-point logic is done based on the nearest point in the pixel-space, so that highlighting points in eclipses/transits feels more natural.

Screen.Recording.2023-05-26.at.9.26.32.AM.mov

* requires upstream changes to generalize markers plugin
@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Patch coverage: 96.42% and project coverage change: +1.75 🎉

Comparison is base (bc42ae3) 83.54% compared to head (0799c17) 85.30%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
+ Coverage   83.54%   85.30%   +1.75%     
==========================================
  Files          15       19       +4     
  Lines         693      803     +110     
==========================================
+ Hits          579      685     +106     
- Misses        114      118       +4     
Impacted Files Coverage Δ
lcviz/helper.py 93.75% <ø> (ø)
lcviz/plugins/coords_info/coords_info.py 95.69% <95.69%> (ø)
lcviz/plugins/__init__.py 100.00% <100.00%> (ø)
lcviz/plugins/coords_info/__init__.py 100.00% <100.00%> (ø)
lcviz/plugins/markers/__init__.py 100.00% <100.00%> (ø)
lcviz/plugins/markers/markers.py 100.00% <100.00%> (ø)
lcviz/viewers.py 95.28% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kecnry kecnry marked this pull request as ready for review May 26, 2023 16:22
@duytnguyendtn duytnguyendtn self-requested a review May 31, 2023 13:31
@duytnguyendtn
Copy link
Collaborator

Basic functionality looks good! Though I'm running into a bug and I can't tell if its' with this PR or with the ephemeris/phase viewer. I have not adjusted any parameters in the plugin, just showed the viewer:

image

If I kick the period to something else and force the points to redraw, the hoverover seems to be constrained properly

@kecnry
Copy link
Member Author

kecnry commented May 31, 2023

Ok, can you file an issue for that (I personally don't think it should hold up this PR)? @rosteen ran into something similar in the review of the phase-folding plugin, but apparently the fix didn't handle every situation. I'm guessing its actually an upstream bug, but I cannot reproduce it on my machine and it will need more investigation.

Copy link
Collaborator

@duytnguyendtn duytnguyendtn left a comment

Choose a reason for hiding this comment

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

Functionality works well (with the exception for the above bug) and the code looks as I would expect. Thanks!

@bmorris3 I feel like this PR is straight forward enough. You can decide whether you'd like to still review!

@kecnry kecnry merged commit 8077908 into spacetelescope:main Jun 1, 2023
@kecnry kecnry deleted the markers-plugin branch June 1, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants