forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_coregistration_transform.py
More file actions
33 lines (25 loc) · 923 Bytes
/
Copy pathplot_coregistration_transform.py
File metadata and controls
33 lines (25 loc) · 923 Bytes
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
"""
=========================================
Plotting head in helmet from a trans file
=========================================
In this example, the head is shown in the
MEG helmet along with the EEG electrodes in MRI
coordinate system. This allows assessing the
MEG <-> MRI coregistration quality.
"""
# Author: Mainak Jas <mainak@neuro.hut.fi>
#
# License: BSD (3-clause)
from mne import read_evokeds
from mne.datasets import sample
from mne.viz import plot_trans
print(__doc__)
data_path = sample.data_path()
data_path = sample.data_path()
subjects_dir = data_path + '/subjects'
evoked_fname = data_path + '/MEG/sample/sample_audvis-ave.fif'
trans_fname = data_path + '/MEG/sample/sample_audvis_raw-trans.fif'
condition = 'Left Auditory'
evoked = read_evokeds(evoked_fname, condition=condition, baseline=(-0.2, 0.0))
plot_trans(evoked.info, trans_fname, subject='sample',
subjects_dir=subjects_dir)