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

MRG: Brain save movie #7574

Merged
merged 12 commits into from
Apr 13, 2020
Merged

Conversation

GuillaumeFavelier
Copy link
Contributor

@GuillaumeFavelier GuillaumeFavelier commented Apr 7, 2020

This PR brings back the part of #7257 about save_movie in _Brain.

It's an item of #7162

@codecov
Copy link

codecov bot commented Apr 8, 2020

Codecov Report

Merging #7574 into master will decrease coverage by 0.09%.
The diff coverage is 66.03%.

@@            Coverage Diff             @@
##           master    #7574      +/-   ##
==========================================
- Coverage   90.13%   90.04%   -0.10%     
==========================================
  Files         453      453              
  Lines       83280    83332      +52     
  Branches    13190    13204      +14     
==========================================
- Hits        75064    75034      -30     
- Misses       5369     5423      +54     
- Partials     2847     2875      +28     

@GuillaumeFavelier
Copy link
Contributor Author

I intend to add compatibility with _TimeViewer in another PR so this is ready for reviews.

Also I typically use this feature with:

import os
import mne
from mne.datasets import sample
data_path = sample.data_path()
sample_dir = os.path.join(data_path, 'MEG', 'sample')
subjects_dir = os.path.join(data_path, 'subjects')
fname_stc = os.path.join(sample_dir, 'sample_audvis-meg')
stc = mne.read_source_estimate(fname_stc, subject='sample')
mne.viz.set_3d_backend('pyvista')
brain = stc.plot(subjects_dir=subjects_dir, hemi='lh',
                 clim=dict(kind='value', pos_lims=[3, 6, 9]),
                 time_viewer=False)
brain.save_movie('movie.mov', time_dilation=8.)

which requires imageio-ffmpeg, should I add it to the requirements too @larsoner, @agramfort ?

@GuillaumeFavelier GuillaumeFavelier changed the title WIP: Brain save movie MRG: Brain save movie Apr 10, 2020
@agramfort
Copy link
Member

agramfort commented Apr 10, 2020 via email

@GuillaumeFavelier
Copy link
Contributor Author

can I save a movie from the interface? cmd+shift+ something?

It's not possible in this PR. It focuses on time_viewer=False.

So do you mean to add it in this context?

@agramfort
Copy link
Member

agramfort commented Apr 10, 2020 via email

@larsoner
Copy link
Member

Yes +1 for adding it to requirements.txt and environment.yml

@GuillaumeFavelier
Copy link
Contributor Author

I'll push a commit to add it right now.

@GuillaumeFavelier
Copy link
Contributor Author

Failures on Circle don't seem related:

/home/circleci/project/doc/auto_tutorials/intro/plot_20_events_from_raw.rst:87: WARNING: term not in glossary: STIM channel

/home/circleci/project/doc/auto_tutorials/preprocessing/plot_60_maxwell_filtering_sss.rst:236: WARNING: term not in glossary: hpi

/home/circleci/project/doc/auto_tutorials/raw/plot_20_event_arrays.rst:43: WARNING: term not in glossary: STIM channel

I'll update after further investigation

@agramfort
Copy link
Member

agramfort commented Apr 10, 2020 via email

@GuillaumeFavelier
Copy link
Contributor Author

rebase on master?

Maybe.

@GuillaumeFavelier
Copy link
Contributor Author

It's already up-to-date apparently.

@agramfort
Copy link
Member

agramfort commented Apr 10, 2020 via email

@GuillaumeFavelier
Copy link
Contributor Author

and master is green?

AFAIK all is good and green there

@GuillaumeFavelier
Copy link
Contributor Author

I restarted Circle for now

@agramfort
Copy link
Member

@GuillaumeFavelier can you just update latest.inc ? thx

@agramfort agramfort merged commit a720b8f into mne-tools:master Apr 13, 2020
@agramfort
Copy link
Member

thx @GuillaumeFavelier

@GuillaumeFavelier GuillaumeFavelier deleted the brain_save_movie branch June 11, 2020 09:43
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