← Digital Concepts 11 interactive pages

The ERP Pipeline

From electricity in a wire to a publication figure, one interactive step at a time.

These pages follow the lab sequence of PSYCH 390 (Electrophysiology of Complex Cognition, St. Olaf College). Each one opens on a single interactive built around the question behind that step, followed by a short explanation and the EEGLAB or ERPLAB command used in lab. Try the controls first, then read.

Figure 1

Map of the Eleven Steps in the ERP Pipeline

The eleven steps as a flow: foundations, then preprocessing, then measurement and plotting Foundations Preprocessing, in lab order Results 1 Electricity 2 EEG Signal 3 The ERP 4 EEGLAB 5 Filtering 6 Re-Reference 7 Bins 8 Interpolation 9 Artifact Detection 10 Scoring 11 Plot, Script
what a signal is and how the tools work cleaning and cutting the recording, in the order the labs run turning epochs into numbers and figures
STEP 1

Introduction to Electricity

Voltage, current, and resistance in a wire, then the same ideas inside a head where the charge carriers are ions.

Ohm's law, impedance
STEP 2

The EEG Signal

A patch of pyramidal cells becomes a dipole; synchrony, alignment, and the skull decide what the scalp electrode sees.

Dipoles, volume conduction
STEP 3

What Is an ERP?

An oddball task runs live; watch averaging pull a few microvolts out of noise ten times larger.

Averaging, the square-root law
STEP 4

EEGLAB and Data Loading

A working sketch of the EEGLAB window. Every menu click writes the command it stands for.

GUI, EEG structure, EEG.history
STEP 5

Filtering

Mix drift, hum, and muscle noise into a recording, set the cutoffs, and see what the filter removes and what it distorts.

pop_eegfiltnew
STEP 6

Re-Referencing

Move a dipole under a 10/20 montage and switch the reference; every waveform changes shape, some change sign.

pop_reref
STEP 7

Bin Assignment and Epoching

Edit a bin descriptor file and watch BINLISTER sort the event codes, cut the epochs, and count the trials.

pop_binlister, pop_epochbin
STEP 8

Channel Interpolation

Break an electrode, then rebuild it from its neighbors and see how much of the truth comes back.

pop_interp
STEP 9

Artifact Detection

Forty-eight trials, some with blinks. Set a threshold and count hits, misses, and false alarms.

pop_artextval, pop_artmwppth
STEP 10

ERP Scoring and Measurement

Mean amplitude, peaks and latencies on the N400, with a panel that shows which measures are fooled by noise.

pop_geterpvalues
STEP 11

Plotting and Scripting

The ten labs as one script that loops over participants, and a figure builder graded against the plotting rules.

pop_ploterps, the full pipeline

How to Use These Pages

Each page stands on its own, so you can open the one that matches the lab you are in. If you are new to EEG, read in order. The first four pages build the vocabulary (what a voltage is, where the brain's voltage comes from, why averaging works, and how EEGLAB works), and the rest follow the order of the processing pipeline you will run on the ERP CORE N400 data (Kappenman et al., 2021). The explanations follow Luck (2014), the textbook for the course. Every interactive uses simulated signals with realistic sizes and timing, so nothing here is a recording from a real participant, and every interactive is a simplification of the real recording.

New to MATLAB itself? The Intro to MATLAB lessons cover variables, arrays, the EEG struct, the path, functions, and loops, with a practice window in the page.

The commands quoted on the pages are the ones from the lab guides: pop_loadset, pop_eegfiltnew, pop_reref, pop_binlister, pop_epochbin, pop_interp, pop_artextval, pop_artmwppth, pop_averager, pop_geterpvalues, and pop_ploterps (Delorme & Makeig, 2004; Lopez-Calderon & Luck, 2014). If you find something that looks wrong, or a control that does not behave as the text says, send a note to rivera21@stolaf.edu.

References

Delorme, A., & Makeig, S. (2004). EEGLAB: An open source toolbox for analysis of single-trial EEG dynamics including independent component analysis. Journal of Neuroscience Methods, 134(1), 9–21. https://doi.org/10.1016/j.jneumeth.2003.10.009

Kappenman, E. S., Farrens, J. L., Zhang, W., Stewart, A. X., & Luck, S. J. (2021). ERP CORE: An open resource for human event-related potential research. NeuroImage, 225, Article 117465. https://doi.org/10.1016/j.neuroimage.2020.117465

Lopez-Calderon, J., & Luck, S. J. (2014). ERPLAB: An open-source toolbox for the analysis of event-related potentials. Frontiers in Human Neuroscience, 8, Article 213. https://doi.org/10.3389/fnhum.2014.00213

Luck, S. J. (2014). An introduction to the event-related potential technique (2nd ed.). MIT Press.