-
Notifications
You must be signed in to change notification settings - Fork 10
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
Time Selector (adapted version of cubeviz's slice) plugin #85
Conversation
556ce65
to
016f5ea
Compare
2bd1979
to
14d8a7a
Compare
* still requires a notebook hack to send the actual data from astropy import units as u times = lcviz.viewers['image']._obj.data()[0].get_component('dt').data[:, 0, 0] sl._obj._update_data(times * u.d)
* slice plugin is hidden if no cube-like data * requires upstream support, subject to change
8676494
to
c92ea66
Compare
* removes need for context-aware as the plugin is now always relevant with synced time indicators * renames "Slice" plugin to "Time Selector"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the loaded data is a TPF, we agreed that the time selector should snap to slice, which looks good.
I load a light curve (not a TPF) into the demo notebook, the slicing logic doesn't appear to be applied. When I hover on an in-transit cadence in flux-vs-time
until the correct cadence is highlighted, and click it with the Slice tool active, I never get an in-transit slice in the ephemeris viewer:
lcviz-slice-snap.mov
I assume this is because my mouse clicks are >1 transit duration from the center of the in-transit exposure, but that's hard to tell.
Let's ensure that snap to slice is active for LCs.
I think what you're describing (if I followed it correctly) is a little more subtle (and quite a bit more complicated) than snapping vs not snapping. There are a few coupled things going on here:
|
Yes, I couldn't see any reason for it not to be the default since there currently was no other default. Do you disagree with that? |
This now supports dragging the indicator in the phase-viewer (by computing a delta time from a delta phase and setting the time in the same cycle). Screen.Recording.2024-03-06.at.3.24.34.PM.mov |
Ok, we're merging this as is into the feature branch and then will consider the points above as we flesh out the rest of the functionality. Thanks for the feedback! |
* Adding TPF translator and parser (#75) * TPF viewer (#81) * make use of upstream refactor to override indices in lcviz (#83) * fix creating phase-viewer when TPF is loaded (#86) * Time Selector (adapted version of cubeviz's slice) plugin (#85) * enable clone viewer for image/TPF viewer (#101) --------- Co-authored-by: Brett M. Morris <bmmorris@stsci.edu>
This PR implements a modified version of cubeviz's slice plugin into lcviz for TPF support.
NOTE: this PR requires the following upstream PRs and therefore an update to the jdaviz pin, and until then the RTD build and tests are expected to fail:
Now that these are all accepted and merged into jdaviz, this PR should be tested against jdaviz main (3.9).
And the following upstream draft PR was created for this, but is no longer used within this PR, so is not necessary:
This will then also bump #82 to require the necessary pin of jdaviz (likely 3.9).
Example usage:
Screen.Recording.2024-03-04.at.12.17.29.PM.mov
Screen.Recording.2024-03-06.at.3.24.34.PM.mov