Skip to content

Disable _TimeViewer when no time info is provided - #7518

Closed
GuillaumeFavelier wants to merge 3 commits into
mne-tools:masterfrom
GuillaumeFavelier:time_viewer_no_time
Closed

GuillaumeFavelier wants to merge 3 commits into
mne-tools:masterfrom
GuillaumeFavelier:time_viewer_no_time

Conversation

@GuillaumeFavelier

Copy link
Copy Markdown
Contributor

This PR locally tests the given brain and disables the _TimeViewer wrapping when no time information is provided. For instance this happens in examples/forward/plot_source_space_morphing.py.

@GuillaumeFavelier

Copy link
Copy Markdown
Contributor Author

Please bear with me, I found a cleaner way based on stc and hemi

@codecov

codecov Bot commented Mar 26, 2020

Copy link
Copy Markdown

Codecov Report

Merging #7518 into master will decrease coverage by 53.54%.
The diff coverage is 7.69%.

@@             Coverage Diff             @@
##           master    #7518       +/-   ##
===========================================
- Coverage   90.13%   36.58%   -53.55%     
===========================================
  Files         452      452               
  Lines       82947    82958       +11     
  Branches    13113    13118        +5     
===========================================
- Hits        74762    30351    -44411     
- Misses       5350    50313    +44963     
+ Partials     2835     2294      -541

Comment thread mne/viz/_3d.py
raise RuntimeError('This function requires pysurfer version '
'>= 0.9')
if time_viewer:
time_viewer = _check_stc_time(stc, hemi)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't want to always disable it, it controls more than time so can still be useful even if there is a single time point

@GuillaumeFavelier

Copy link
Copy Markdown
Contributor Author

Closing since #7520 suggests a better compromise instead of disabling _TimeViewer completely.

@GuillaumeFavelier
GuillaumeFavelier deleted the time_viewer_no_time branch June 11, 2020 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants