MEGSIM experimental and simulation datasets

The MEGSIM consists of experimental and simulated MEG data which can be useful for reproducing research results.

The MEGSIM files will be dowloaded automatically.

The datasets are documented in: Aine CJ, Sanfratello L, Ranken D, Best E, MacArthur JA, Wallace T, Gilliam K, Donahue CH, Montano R, Bryant JE, Scott A, Stephen JM (2012) MEG-SIM: A Web Portal for Testing MEG Analysis Methods using Realistic Simulated and Empirical Data. Neuroinformatics 10:141-158

  • ../../_images/sphx_glr_plot_megsim_data_001.png
  • ../../_images/sphx_glr_plot_megsim_data_002.png
  • ../../_images/sphx_glr_plot_megsim_data_003.png

Out:

Opening raw data file /home/ubuntu/mne_data/MEGSIM/megsim/empdata/neuromag/visual/subject1_day1_vis_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 : 434320 ... 2381639 =    242.246 ...  1328.383 secs
Ready.
Current compensation grade : 0
851 events found
Events id: [ 2  3  5  9 17]
218 matching events found
Created an SSP operator (subspace dimension = 3)
3 projection items activated
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on MAG : [u'MEG 2311', u'MEG 2441']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 061', u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 061']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
    Rejecting  epoch based on EOG : [u'EOG 062']
This filename (/home/ubuntu/mne_data/MEGSIM/megsim/simdata/neuromag/visual/M87174545_vis_sim1A_4mm_30na_neuro_rn.fif) does not conform to MNE naming conventions. All evoked files should end with -ave.fif or -ave.fif.gz
Reading /home/ubuntu/mne_data/MEGSIM/megsim/simdata/neuromag/visual/M87174545_vis_sim1A_4mm_30na_neuro_rn.fif ...
    Read a total of 3 projection items:
        PCA-v1 (1 x 102) active
        PCA-v2 (1 x 102) active
        PCA-v3 (1 x 102) active
    Found the data of interest:
        t =    -199.68 ...     499.75 ms (Average to trigger # 25)
        0 CTF compensation matrices available
        nave = 100 - aspect type = 100
Projections have already been applied. Setting proj attribute to True.
No baseline correction applied

import mne
from mne import find_events, Epochs, pick_types, read_evokeds
from mne.datasets.megsim import load_data

print(__doc__)

condition = 'visual'  # or 'auditory' or 'somatosensory'

# Load experimental RAW files for the visual condition
raw_fnames = load_data(condition=condition, data_format='raw',
                       data_type='experimental', verbose=True)

# Load simulation evoked files for the visual condition
evoked_fnames = load_data(condition=condition, data_format='evoked',
                          data_type='simulation', verbose=True)

raw = mne.io.read_raw_fif(raw_fnames[0])
events = find_events(raw, stim_channel="STI 014", shortest_event=1)

# Visualize raw file
raw.plot()

# Make an evoked file from the experimental data
picks = pick_types(raw.info, meg=True, eog=True, exclude='bads')

# Read epochs
event_id, tmin, tmax = 9, -0.2, 0.5
epochs = Epochs(raw, events, event_id, tmin, tmax, baseline=(None, 0),
                picks=picks, reject=dict(grad=4000e-13, mag=4e-12, eog=150e-6))
evoked = epochs.average()  # average epochs and get an Evoked dataset.
evoked.plot()

# Compare to the simulated data
evoked_sim = read_evokeds(evoked_fnames[0], condition=0)
evoked_sim.plot()

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

Generated by Sphinx-Gallery