{ "cells": [ { "cell_type": "markdown", "id": "30362093-e9da-4529-840a-72b4bf389912", "metadata": {}, "source": [ "# Segmentation into ERP epochs\n", "\n", "In this lesson we will learn how to segment continuous EEG data into epochs, time-locked to experimental events of interest. This is the stage at which we move from working with EEG data, to ERP data. Recall that *ERP* stands for *event-related potential* — short segments of EEG data that are time-locked to particular events such as stimulus onsets or participant responses. In the previous steps we removed artifacts from the continuous EEG data. Now, we will segment the data into epochs, and apply artifact correction to the segments, based on the ICA decomposition that we performed in the previous step, as well as using the AutoReject algorithm to automatically detect and remove bad epochs and channels that ICA may not fix." ] }, { "cell_type": "markdown", "id": "20585629-b838-4982-acba-90cbd9296461", "metadata": {}, "source": [ "## Import MNE and Read Filtered Data\n", "\n", "We will segment the band-pass filtered version of the continuous EEG data that we created in the filtering lesson" ] }, { "cell_type": "code", "execution_count": 1, "id": "c1fb1651-d022-4725-ab5f-97fa2dde8a2b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Measurement date | \n", " \n", "January 20, 2015 13:15:58 GMT | \n", " \n", "
---|---|
Experimenter | \n", " \n", "Unknown | \n", " \n", "Participant | \n", " \n", "Unknown | \n", " \n", " \n", "
Digitized points | \n", " \n", "19 points | \n", " \n", "
Good channels | \n", "16 EEG | \n", "
Bad channels | \n", "None | \n", "
EOG channels | \n", "Not available | \n", "
ECG channels | \n", "Not available | \n", " \n", "
Sampling frequency | \n", "500.00 Hz | \n", "
Highpass | \n", "0.10 Hz | \n", "
Lowpass | \n", "30.00 Hz | \n", "
Filenames | \n", "sub-001-filt-raw.fif | \n", "
Duration | \n", "00:13:38 (HH:MM:SS) | \n", "
Number of events | \n", "531 | \n", "
---|---|
Events | \n", " \n", "CorResp: 144 IncorResp: 1 Match/A: 18 Match/B: 18 Match/C: 18 Match/D: 18 Mismatch/A: 18 Mismatch/B: 18 Mismatch/C: 18 Mismatch/D: 18 PicOnset: 144 RespFeedback: 1 RespPrompt: 96 unused: 1 | \n",
" \n",
"
Time range | \n", "-0.100 – 1.000 s | \n", "
Baseline | \n", "-0.100 – 0.000 s | \n", "
Number of events | \n", "1 | \n", "
---|---|
Events | \n", " \n", "RespFeedback: 1 | \n", " \n", "
Time range | \n", "-0.100 – 1.000 s | \n", "
Baseline | \n", "-0.100 – 0.000 s | \n", "
Number of events | \n", "5 | \n", "
---|---|
Events | \n", " \n", "CorResp: 2 Match/A: 1 PicOnset: 1 RespPrompt: 1 | \n",
" \n",
"
Time range | \n", "-0.100 – 1.000 s | \n", "
Baseline | \n", "-0.100 – 0.000 s | \n", "
Number of events | \n", "18 | \n", "
---|---|
Events | \n", " \n", "Match/A: 18 | \n", " \n", "
Time range | \n", "-0.100 – 1.000 s | \n", "
Baseline | \n", "-0.100 – 0.000 s | \n", "
Number of events | \n", "1 | \n", "
---|---|
Events | \n", " \n", "Match/A: 1 | \n", " \n", "
Time range | \n", "-0.100 – 1.000 s | \n", "
Baseline | \n", "-0.100 – 0.000 s | \n", "
Number of events | \n", "36 | \n", "
---|---|
Events | \n", " \n", "Match/A: 18 Match/B: 18 | \n",
" \n",
"
Time range | \n", "-0.100 – 1.000 s | \n", "
Baseline | \n", "-0.100 – 0.000 s | \n", "
Number of events | \n", "72 | \n", "
---|---|
Events | \n", " \n", "Match/A: 18 Match/B: 18 Match/C: 18 Match/D: 18 | \n",
" \n",
"
Time range | \n", "-0.100 – 1.000 s | \n", "
Baseline | \n", "-0.100 – 0.000 s | \n", "
Number of events | \n", "36 | \n", "
---|---|
Events | \n", " \n", "Match/A: 18 Mismatch/A: 18 | \n",
" \n",
"
Time range | \n", "-0.100 – 1.000 s | \n", "
Baseline | \n", "-0.100 – 0.000 s | \n", "
Number of events | \n", "423 | \n", "
---|---|
Events | \n", " \n", "CorResp: 111 IncorResp: 0 Match/A: 16 Match/B: 17 Match/C: 15 Match/D: 13 Mismatch/A: 16 Mismatch/B: 15 Mismatch/C: 13 Mismatch/D: 14 PicOnset: 116 RespFeedback: 1 RespPrompt: 76 unused: 0 | \n",
" \n",
"
Time range | \n", "-0.100 – 1.000 s | \n", "
Baseline | \n", "-0.100 – 0.000 s | \n", "