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

stc.plot setting initial_time not working with time_viewer=True (PyVista) #7379

Closed
SophieHerbst opened this issue Mar 4, 2020 · 1 comment · Fixed by #7381
Closed

stc.plot setting initial_time not working with time_viewer=True (PyVista) #7379

SophieHerbst opened this issue Mar 4, 2020 · 1 comment · Fixed by #7381
Assignees

Comments

@SophieHerbst
Copy link
Contributor

SophieHerbst commented Mar 4, 2020

There is something wrong with setting the initial time for an stc.plot with time_viewer=True (PyVista), it always defaults to the same value. I updated to the latest developers version, but the problem persists. @GuillaumeFavelier, maybe you know why?

import mne

mne.viz.set_3d_backend('pyvista')

data_dir = mne.datasets.sample.data_path('/volatile')
subjects_dir = data_dir + '/subjects'
stc_path = data_dir + '/MEG/sample/sample_audvis-meg-eeg'

stc = mne.read_source_estimate(stc_path, 'sample')

# First, morph the data to fsaverage_sym, for which we have left_right
# registrations:
stc = mne.compute_source_morph(stc, 'sample', 'fsaverage_sym', smooth=5,
                               warn=False,
                               subjects_dir=subjects_dir).apply(stc)

stc.plot(hemi='split', subjects_dir=subjects_dir, initial_time=0.,
          size=(800, 600),time_viewer=True)

pyvista_initial_time

@GuillaumeFavelier
Copy link
Contributor

This is definitely a bug, I will report it in #7162 and investigate this. Thanks for reporting @SophieHerbst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants