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

ephemeris plugin: custom phase-wrapping #44

Merged
merged 11 commits into from
Sep 13, 2023

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Sep 1, 2023

This PR implements a "phase_wrap" option in the ephemeris plugin along with automatic phase-limits updates a convenient in-plugin identification when the phase-wrapped data falls outside the viewer x-limits.

original in-plugin limits warning **NOTE**: hint text for the wrapping UI element has been updated slightly since this recording to say "Phased data will encompass the range (1-wrap_at, wrap_at)"
Screen.Recording.2023-09-01.at.2.17.29.PM.mov
auto-updating phase-limits
Screen.Recording.2023-09-06.at.9.46.23.AM.mov

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Patch coverage is 97.22% of modified lines.

Files Changed Coverage
...z/plugins/frequency_analysis/frequency_analysis.py ø
lcviz/plugins/ephemeris/ephemeris.py 96.96%
lcviz/viewers.py 100.00%

📢 Thoughts on this report? Let us know!.

@kecnry kecnry requested a review from bmorris3 September 1, 2023 18:37
@kecnry kecnry marked this pull request as ready for review September 1, 2023 18:37
@kecnry kecnry force-pushed the ephem_wrap_at branch 3 times, most recently from f220d65 to df1de4c Compare September 6, 2023 13:48
@bmorris3
Copy link
Contributor

bmorris3 commented Sep 8, 2023

Seems like now the phase axis is backwards? I entered wrap at 0.5 and the phase axis now spans (0.5, -0.5):

Screen Shot 2023-09-08 at 11 11 50

Comment on lines 405 to 408
if event.get('name') == 'wrap_at':
pvs = self.phase_viewer.state
delta_phase = event.get('new') - event.get('old')
pvs.x_min, pvs.x_max = pvs.x_min + delta_phase, pvs.x_max + delta_phase
Copy link
Member Author

Choose a reason for hiding this comment

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

@bmorris3 - I can't reproduce the flipped axis you're seeing. Can you either debug to see what is happening in these lines or send a recording if any intermediate steps are necessary to reproduce?

Copy link
Contributor

@bmorris3 bmorris3 left a comment

Choose a reason for hiding this comment

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

This works nicely, with one caveat to fix before merge.

@kecnry kecnry merged commit 954f6cb into spacetelescope:main Sep 13, 2023
@kecnry kecnry deleted the ephem_wrap_at branch September 13, 2023 18:13
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