Skip to content

Commit

Permalink
FIX: Regress
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jan 25, 2024
1 parent 16d2df5 commit e76d967
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tutorials/inverse/95_phantom_KIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,17 @@
# cut from ~800 to ~300s for speed, and also at convenient dip stim boundaries
# chosen by examining MISC 017 by eye.
raw.crop(11.5, 302.9).load_data()
raw.filter(None, 40) # 11 Hz stimulation, no need to keep higher freqs
# 11 Hz stimulation, no need to keep higher freqs
picks_artifact = ["MISC 001", "MISC 002", "MISC 003"]
picks = np.r_[
mne.pick_types(raw.info, meg=True),
mne.pick_channels(raw.info["ch_names"], picks_artifact),
]
raw.filter(None, 40, picks=picks)
# Apply reference regression
mne.preprocessing.regress_artifact(
raw, picks="meg", picks_artifact=picks_artifact, copy=False
)
plot_scalings = dict(mag=5e-12) # large-amplitude sinusoids
raw_plot_kwargs = dict(duration=15, n_channels=50, scalings=plot_scalings)
raw.plot(**raw_plot_kwargs)
Expand Down

0 comments on commit e76d967

Please sign in to comment.