Plotting sensor layouts of MEG systems

In this example, sensor layouts of different MEG systems are shown.

  • ../../_images/sphx_glr_plot_meg_sensors_001.png
  • ../../_images/sphx_glr_plot_meg_sensors_002.png
  • ../../_images/sphx_glr_plot_meg_sensors_003.png
  • ../../_images/sphx_glr_plot_meg_sensors_004.png
  • ../../_images/sphx_glr_plot_meg_sensors_005.png

Out:

Opening raw data file /home/ubuntu/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw.fif...
    Read a total of 3 projection items:
        PCA-v1 (1 x 102)  idle
        PCA-v2 (1 x 102)  idle
        PCA-v3 (1 x 102)  idle
    Range : 25800 ... 192599 =     42.956 ...   320.670 secs
Ready.
Current compensation grade : 0
ds directory : /home/ubuntu/mne_data/MNE-spm-face/MEG/spm/SPM_CTF_MEG_example_faces1_3D.ds
    res4 data read.
    hc data read.
    Separate EEG position data file not present.
    Quaternion matching (desired vs. transformed):
      -0.90   72.01    0.00 mm <->   -0.90   72.01    0.00 mm (orig :  -43.09   61.46 -252.17 mm) diff =    0.000 mm
       0.90  -72.01    0.00 mm <->    0.90  -72.01    0.00 mm (orig :   53.49  -45.24 -258.02 mm) diff =    0.000 mm
      98.30    0.00    0.00 mm <->   98.30   -0.00    0.00 mm (orig :   78.60   72.16 -241.87 mm) diff =    0.000 mm
    Coordinate transformations established.
    Polhemus data for 3 HPI coils added
    Device coordinate locations for 3 HPI coils added
    Measurement info composed.
Finding samples for /home/ubuntu/mne_data/MNE-spm-face/MEG/spm/SPM_CTF_MEG_example_faces1_3D.ds/SPM_CTF_MEG_example_faces1_3D.meg4:
    System clock channel is available, checking which samples are valid.
    1 x 324474 = 324474 samples from 340 chs
Current compensation grade : 3
Reading 4D PDF file /home/ubuntu/mne-python/mne/io/bti/tests/data/test_pdf_linux...
Creating Neuromag info structure ...
... Setting channel info structure.
... putting coil transforms in Neuromag coordinates
... Reading digitization points from /home/ubuntu/mne-python/mne/io/bti/tests/data/test_hs_linux
... putting digitization points in Neuromag coordinates
... Computing new device to head transform.
Done.
Currently direct inclusion of 4D weight tables is not supported. For critical use cases please take into account the MNE command "mne_create_comp_data" to include weights as printed out by the 4D "print_table" routine.
Current compensation grade : 0
Extracting SQD Parameters from /home/ubuntu/mne-python/mne/io/kit/tests/data/test.sqd...
Creating Raw.info structure...
KIT-System ID 34: NYU 160ch System since Jan24 2009
Setting channel info structure...
Creating Info structure...
Current compensation grade : 0
Ready.
Reading header...
Loading mne loc file /home/ubuntu/mne-python/mne/io/artemis123/resources/Artemis123_mneLoc.csv
Current compensation grade : 0
Getting helmet for system 306m
Getting helmet for system KIT
Getting helmet for system CTF_275
Getting helmet for system 306m
Getting helmet for system Magnes_3600wh

# Author: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD (3-clause)

import os.path as op

from mayavi import mlab

import mne
from mne.io import read_raw_fif, read_raw_ctf, read_raw_bti, read_raw_kit
from mne.io import read_raw_artemis123
from mne.datasets import sample, spm_face, testing
from mne.viz import plot_trans

print(__doc__)

bti_path = op.abspath(op.dirname(mne.__file__)) + '/io/bti/tests/data/'
kit_path = op.abspath(op.dirname(mne.__file__)) + '/io/kit/tests/data/'
raws = dict(
    Neuromag=read_raw_fif(sample.data_path() +
                          '/MEG/sample/sample_audvis_raw.fif'),
    CTF_275=read_raw_ctf(spm_face.data_path() +
                         '/MEG/spm/SPM_CTF_MEG_example_faces1_3D.ds'),
    Magnes_3600wh=read_raw_bti(op.join(bti_path, 'test_pdf_linux'),
                               op.join(bti_path, 'test_config_linux'),
                               op.join(bti_path, 'test_hs_linux')),
    KIT=read_raw_kit(op.join(kit_path, 'test.sqd')),
    Artemis123=read_raw_artemis123(op.join(testing.data_path(), 'ARTEMIS123',
                                   'Artemis_Data_2016-11-03-15h-58m_test.bin'))
)

for system, raw in raws.items():
    # We don't have coil definitions for KIT refs, so exclude them
    ref_meg = False if system == 'KIT' else True
    fig = plot_trans(raw.info, trans=None, dig=False, eeg_sensors=False,
                     meg_sensors=True, coord_frame='meg', ref_meg=ref_meg)
    text = mlab.title(system)
    text.x_position = 0.5
    text.y_position = 0.95
    text.property.vertical_justification = 'top'
    text.property.justification = 'center'
    text.actor.text_scale_mode = 'none'
    text.property.bold = True
    mlab.draw(fig)

Total running time of the script: ( 0 minutes 5.263 seconds)

Generated by Sphinx-Gallery