Skip to content

Commit 353bc8a

Browse files
Drop bad channel in 10_publication_figure.py
Visualisation tutorial 10 is broken because finding peaks without dropping bars finds a random point on a broken grad. This drops the bad channel before finding the peak.
1 parent 9e5a929 commit 353bc8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tutorials/visualization/10_publication_figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
fname_evoked = data_path / "MEG" / "sample" / "sample_audvis-ave.fif"
4242

4343
evoked = mne.read_evokeds(fname_evoked, "Left Auditory")
44-
evoked.pick(picks="grad").apply_baseline((None, 0.0))
44+
evoked.pick(picks="grad").drop_channels(evoked.info['bads']).apply_baseline((None, 0.0))
4545
max_t = evoked.get_peak()[1]
4646

4747
stc = mne.read_source_estimate(fname_stc)

0 commit comments

Comments
 (0)