Skip to content

ENH: Improve report plotting and animate_topomap#13905

Draft
larsoner wants to merge 4 commits into
mne-tools:mainfrom
larsoner:report
Draft

ENH: Improve report plotting and animate_topomap#13905
larsoner wants to merge 4 commits into
mne-tools:mainfrom
larsoner:report

Conversation

@larsoner
Copy link
Copy Markdown
Member

I don't like how long it takes to generate reports, so I was trying to speed it up a bit. In doing so, I realized animate_topomap wasn't working properly, and refactored it to reuse plot_evoked_topomap code. This makes it more feature-complete, and I fixed its behavior (with both blit=True and blit=False). I also made it so the report now has butterfly=True from the animate_topomap, which I think is nice. From this testing code:

MWE
import mne

sample_dir = mne.datasets.sample.data_path() / "MEG" / "sample"
evoked_path = sample_dir / "sample_audvis-ave.fif"
cov_path = sample_dir / "sample_audvis-cov.fif"

evokeds = mne.read_evokeds(evoked_path, baseline=(None, 0))
#fig, anim = evokeds[0].animate_topomap(butterfly=True, frame_rate=2)
report = mne.Report()
report.add_evokeds(
    evokeds=evokeds[:1],
    n_time_points=20,
)
report.save("report_evoked.html", overwrite=True, open_browser=True)

You can see it:

image

I expect some test breakages, will push fixes for those.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant