-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG, FIX: Fix single time point #7520
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7520 +/- ##
==========================================
- Coverage 90.13% 90.12% -0.01%
==========================================
Files 452 452
Lines 82947 82987 +40
Branches 13113 13117 +4
==========================================
+ Hits 74762 74792 +30
- Misses 5350 5361 +11
+ Partials 2835 2834 -1 |
|
Pushed a commit to fix the PyQt-abort-on-error problem |
|
How do we select the functions wrapped by |
|
In principle, anything that could cause an error should be guarded. But in the special case of |
|
@GuillaumeFavelier @agramfort this should be ready for review/merge now |
agramfort
left a comment
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.
@GuillaumeFavelier please merge if you're happy. You know this code better than me
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.
LGTM @larsoner, I tested it and it works even when only one time step is available. We should think about a better name for this wrapper 😄
I think a bit more work is needed in order to display the final (updated) state of _TimeViewer when it's ready only at the end. For instance, the sliders are displayed as soon as they are added. We don't have the option to add them to the scene while hidden and just toggle the interface for example. We can take care of that in another PR, I think it was reported somewhere.
|
Maybe it would require a PyVista PR? Or is there some general VTK renderer update blocking that we could use? |
|
I think a trick similar to https://github.com/mne-tools/mne-python/blob/master/mne/viz/_brain/_brain.py#L947-L963 would be necessary where we configure the representation of the widget to be hidden by default. This would require a PR on pyvista.
hm... I don't know any. I tried hiding the window (or interactor) and display at the end but although the window reappears ready, there is the fact that it disappears out of the blue. |
|
Maybe the rendering thread could be paused... Reference: https://github.com/pyvista/pyvista/blob/master/pyvista/plotting/qt_plotting.py#L449 |
Alternative to #7518.
I think we should show the (incorrectly-named)
_TimeViewereven if there is a single time point because it shows useful controls like clim, view, etc. (and others if we add them later). This hides the playback speed and time slider as well.