File: hf_sef_data.py

package info (click to toggle)
python-mne 1.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 131,492 kB
  • sloc: python: 213,302; javascript: 12,910; sh: 447; makefile: 144
file content (40 lines) | stat: -rw-r--r-- 778 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
.. _ex-hf-sef-data:

==============
HF-SEF dataset
==============

This example looks at high-frequency SEF responses.
"""
# Author: Jussi Nurminen (jnu@iki.fi)
#
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.

# %%

import os

import mne
from mne.datasets import hf_sef

fname_evoked = os.path.join(hf_sef.data_path(), "MEG/subject_b/hf_sef_15min-ave.fif")

print(__doc__)

# %%
# Read evoked data
evoked = mne.Evoked(fname_evoked)

# %%
# Create a highpass filtered version
evoked_hp = evoked.copy()
evoked_hp.filter(l_freq=300, h_freq=None)

# %%
# Compare high-pass filtered and unfiltered data on a single channel
ch = "MEG0443"
pick = evoked.ch_names.index(ch)
edi = {"HF": evoked_hp, "Regular": evoked}
mne.viz.plot_compare_evokeds(edi, picks=pick)