-
Notifications
You must be signed in to change notification settings - Fork 6
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
Expose time functionality #103
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
==========================================
- Coverage 71.21% 67.36% -3.86%
==========================================
Files 18 21 +3
Lines 1063 1250 +187
==========================================
+ Hits 757 842 +85
- Misses 306 408 +102 ☔ View full report in Codecov by Sentry. |
@Carifio24 thanks for the PR! Can you rebase this to make sure the CI is passing before I review this? Note that |
@astrofrog I've rebased (and fixed some codestyle issues), but I expect the CI will fail as this depends on PRs to glue and echo. |
…t time in Qt options widget.
…t functionality between multiple widgets.
…der when bounds change.
…n Qt depending on resolution.
@Carifio24 - I just tried this out in Qt glue, I did the following:
Nothing changes in the view - am I doing something wrong above? |
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.
Also not sure if related to this PR or not, but in Qt glue, the default tab for the viewer options is 'Other' - but it should probably be the first tab?
@astrofrog What you were doing is correct, I think it's probably just a case of the points being too small and thus no change being apparent. I did what you described and changed the color and point size, and here's how it looks for me: Screen.Recording.2024-09-05.at.9.04.07.AM.online-video-cutter.com.mp4And the issue with the viewer starting from the wrong tab was from this PR, I just pushed a commit to fix that. |
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.
Ok thanks, very nice! Feel free to merge once you feel this is ready :)
Sounds good! Only thing I still want to look at is whether the CI failures are related to this PR or not. |
Closed and reopened to re-run CI. |
While working on WWT interactives recently that were examining motion over time, I realized this sort of visualization/data exploration is completely impossible in glue-wwt, since the time functionality of the WWT engine isn't exposed at all. This PR looks to remedy that issue by exposing WWT's time functionality in both the Qt and Jupyter viewers.
This PR contains updates to both the viewer and to table layers (I don't know that there's any sort of natural use case for image layers, but if there is one I'd be interested in learning what it is). On the viewer side, we allow setting the following WWT time settings:
Internally, there are callbacks which maintain the relative order min <= current <= max for the time values. If one wants to run time backwards, the clock rate can be set to be negative. It felt too convoluted to me to allow having both inverted time bounds and a negative clock rate.
On the table layer side, one can toggle whether or not each layer is a time series layer. If this is set to true, we allow users to set:
DateTimeComponent
.Quantity
. This determines how quickly points fade out of view.Note that this relies on updates to
glue
(see glue-viz/glue#2475) andecho
(glue-viz/echo#37), to allow serialization of astropyUnit
s (for the decay) and to autoconnect Qt datetime widgets (for the min/max time selection), respectively.For testing purposes, here's an example session and notebook where I've added a (totally meaningless) time component to the W5 data set. Giving a time rate on the order of 1e6 gives a good rate for the motion.
TimeExamples.zip