diff --git a/examples/visualization/plot_montage.py b/examples/visualization/plot_montage.py new file mode 100644 index 00000000000..6ab594c4081 --- /dev/null +++ b/examples/visualization/plot_montage.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +""" +Plotting sensor layouts of EEG Systems +====================================== + +Show sensor layouts of different EEG systems. +""" # noqa +# Authors: Alexandre Gramfort +# Joan Massich +# +# License: BSD Style. + +from mayavi import mlab +import os.path as op + +import mne +from mne.channels.montage import get_builtin_montages +from mne.viz import plot_alignment + +# print(__doc__) + +subjects_dir = op.join(mne.datasets.sample.data_path(), 'subjects') + +############################################################################### +# check all montages +# + +fix_units = {'EGI_256': 'cm', 'GSN-HydroCel-128': 'cm', + 'GSN-HydroCel-129': 'cm', 'GSN-HydroCel-256': 'cm', + 'GSN-HydroCel-257': 'cm', 'GSN-HydroCel-32': 'cm', + 'GSN-HydroCel-64_1.0': 'cm', 'GSN-HydroCel-65_1.0': 'cm', + 'biosemi128': 'mm', 'biosemi16': 'mm', 'biosemi160': 'mm', + 'biosemi256': 'mm', 'biosemi32': 'mm', 'biosemi64': 'mm', + 'easycap-M1': 'mm', 'easycap-M10': 'mm', + 'mgh60': 'm', 'mgh70': 'm', + 'standard_1005': 'm', 'standard_1020': 'm', + 'standard_alphabetic': 'm', + 'standard_postfixed': 'm', + 'standard_prefixed': 'm', + 'standard_primed': 'm'} + +############################################################################### +# check all montages +# + +for current_montage in get_builtin_montages(): + montage = mne.channels.read_montage(current_montage, + unit=fix_units[current_montage], + transform=False) + + info = mne.create_info(ch_names=montage.ch_names, + sfreq=1, + ch_types='eeg', + montage=montage) + + fig = plot_alignment(info, trans=None, + subject='fsaverage', + subjects_dir=subjects_dir, + eeg=['original', 'projected'], + ) + mlab.view(135, 80) + mlab.title(montage.kind, figure=fig) diff --git a/mne/datasets/utils.py b/mne/datasets/utils.py index 3f20a83bf2e..4fad7873084 100644 --- a/mne/datasets/utils.py +++ b/mne/datasets/utils.py @@ -252,7 +252,7 @@ def _data_path(path=None, force_update=False, update_path=True, download=True, 'datasets/foo.tgz', misc='https://codeload.github.com/mne-tools/mne-misc-data/' 'tar.gz/%s' % releases['misc'], - sample="https://osf.io/86qa2/download", + sample="https://osf.io/j4ms3/download", somato='https://osf.io/tp4sg/download', spm='https://osf.io/je4s8/download', testing='https://codeload.github.com/mne-tools/mne-testing-data/'