# Authors: Jose C. Garcia Alanis <*****@*****.**> # # License: BSD (3-clause) import numpy as np import matplotlib.pyplot as plt import mne from mne.datasets import limo from mne.stats import linear_regression print(__doc__) # fetch data from subject 2 and interpolate missing channels limo_epochs = limo.load_data(subject=2) ############################################################################### # In the original LIMO experiment, participants performed a two-alternative # forced choice task discriminating between the same two faces. # The critical manipulation in the experiment was that the phase-coherence of # the presented face-stimuli was varied across a noise-signal continuum # spanning from 0 to 100 %. In other words, faces with high phase coherence # were easily discernible, while faces with low phase-coherence were hard to # identify as such). # The events coding the presentation of each of these two faces are stored in # ``limo_epochs.events``. # # We can visualise the distribution of the face events contained in the # epochs structure. Events should appear clearly grouped, as they are ordered # during the import process.
from mne.datasets import limo from mne.evoked import EvokedArray from mne.stats import fdr_correction from mne.viz import plot_compare_evokeds ############################################################################### # Here, we'll import only one subject. The example shows how to compute p-values # for beta coefficients derived from linear regression using sklearn. # In addition, we propose to visualize these p-values in terms of # Shannon information values [1]_ (i.e., surprise values) # for better interpretation. # subject id subjects = [2] # create a dictionary containing participants data limo_epochs = {str(subj): limo.load_data(subject=subj) for subj in subjects} # interpolate missing channels for subject in limo_epochs.values(): subject.interpolate_bads(reset_bads=True) # epochs to use for analysis epochs = limo_epochs['2'] # only keep eeg channels epochs = epochs.pick_types(eeg=True) # save epochs information (needed for creating a homologous # epochs object containing linear regression result) epochs_info = epochs.info tmin = epochs.tmin
# # The presented faces varied across a noise-signal (or phase-coherence) # continuum spanning from 0 to 85% in increasing steps of 5%. # In other words, faces with high phase-coherence (e.g., 85%) were easy to # identify, while faces with low phase-coherence (e.g., 5%) were hard to # identify and by extension very hard to discriminate. # # # Load the data # ------------- # # We'll begin by loading the data from subject 1 of the LIMO dataset. # This step can take a little while if you're loading the data for the # first time. limo_epochs = load_data(subject=subj) ############################################################################### # Note that the result of the loading process is an # :class:`mne.EpochsArray` containing the data ready to interface # with MNE-Python. print(limo_epochs) ############################################################################### # Visualize events # ---------------- # # We can visualise the distribution of the face events contained in the # ``limo_epochs`` structure. Events should appear clearly grouped, as the # epochs are ordered by condition.