The EEG notebookfield notes by Kavya Jhaveri
a few answers,
several more questions
02 / INSPECT & CLEANplease blink, we’ll work around it

Whose signal
is it, anyway?

Our electrodes are in place, but the recording catches more than brain activity. Blinking, shifting in your seat or scratching an itch can leave large traces, called artifacts when they interfere with what we want to study.1

Something happened here

Each line below is a channel, a recording from an electrode compared with a reference. Choose a marked moment and see which lines change together.

Same voltage scale across all three channels

Clues worth checking

Eyes: large changes near the front; eye recordings (EOG) help check their timing. Muscles: fast, irregular activity, although frequency alone cannot identify it.

Contact problems: drifting, jumps, unusual noise or a flat channel. Electrical interference: a peak near 50 or 60 Hz in a frequency plot.

Check several channels at the same scale. A large signal isn’t automatically an artifact, particularly in clinical EEG.1,4

When an electrode lets you down

We may exclude an unreliable channel or estimate it from neighbouring electrodes, called interpolation. This doesn’t recover the missing measurement, and several neighbouring failures make the estimate less reliable.4

Compared with what?

Remember that EEG measures a difference between signals? The reference is the one we compare the others against. Change it below and watch the recorded number move, even though the electrode’s value stays fixed.

12electrode−5reference=7µV recorded

12 − 5 = 7 µV. Move the slider to change the comparison.

Made-up values for one moment, measured against the same starting point.

How do we choose a reference?

The equipment and study guide the choice. Common options include Cz, at the top of the head, or electrodes near the ears. The contact should be reliable, but no location is free of electrical activity.

After recording, we can change the comparison, called re-referencing. One option is the average of usable scalp electrodes, especially with broad, even coverage. Noisy electrodes need attention first because their noise would enter that average.

There’s no single best choice. Researchers choose one suited to their analysis and report it so others can compare results fairly.5

How do we clean it?

Filter

A filter reduces changes happening at chosen speeds. It can help with slow drift, when the line gradually wanders up or down because of sweat or changing contact, but it may reduce slow brain activity too.2

See what each filter reduces

Choose a filter and compare the blue bars with the grey starting levels. The horizontal axis shows speed in Hz, or cycles per second.

Grey outline: before · blue: after. Example settings show the principle, not recommended EEG settings.

Filters select by speed, so brain activity and artifacts in the same range can both be reduced. Check the feature you’re studying before and after filtering.2

Separate with ICA

Each electrode picks up a mixture. Independent component analysis (ICA) uses patterns across electrodes to estimate parts of that mixture, called components. We inspect them and may remove one that appears to come from blinking, for example.3

How do we know what to remove?

Check when a component changes, how fast it varies and where it is strongest across the head. Eye or heart recordings can offer extra clues. Software can suggest a label, but a component isn’t necessarily one physical source.

The separation is an estimate, and removing the wrong part can take brain activity with it.3

Exclude

Leave unusable stretches out. You lose data, but keeping a large artifact can make the result less reliable.1

After cleaning: what should I check?

Compare before and after at the same scale. Check artifacts, frequencies and the response you’re studying, then count what was removed. Keep the original data and record your settings, reference, rejection rules and software versions.6

Papers behind this page

1. Zhang et al. (2024). Evaluating the effectiveness of artifact correction and rejection in event-related potential research. Psychophysiology, 61, e14511.

2. Widmann & Schröger (2012). Filter effects and filter artifacts in the analysis of electrophysiological data. Frontiers in Psychology, 3, 233.

3. EEGLAB: Independent component analysis. Practical guidance on inspection, component removal and their limitations.

4. Bigdely-Shamlo et al. (2015). The PREP pipeline: standardized preprocessing for large-scale EEG analysis. Frontiers in Neuroinformatics, 9, 16.

5. EEGLAB: Background on re-referencing.

6. Kappenman et al. (2021). ERP CORE: An open resource for human event-related potential research. NeuroImage, 225, 117465. Includes documented processing examples; these are not universal settings.

Figures are original teaching simulations, not participant recordings or a validated cleaning pipeline.

3
TRY IT / SIMULATED DATAone blink, quite an entrance

Invite a little noise in

Switch on a blink or a jaw clench and watch what gets added to the same underlying signal.

Blue: underlying simulated signal
Rust: signal plus selected artifacts

What does cleaning change?

Average neighbouring points to smooth the line, then compare it with the underlying signal to see which details disappear.

Blue: original underlying signal
Rust: after smoothing the mixed recording
Grey dotted: before · purple dashed: removed difference

What’s happening in this demo?

This invented 3-second signal mixes 6 and 10 Hz rhythms at 500 samples per second. A broad pulse represents a blink; a 55/83 Hz burst represents jaw activity. These shapes illustrate artifacts, not rules for identifying them.

The slider averages neighbouring samples, using shorter windows at the edges. It demonstrates smoothing, not a full EEG cleaning pipeline or ICA. We know the original signal because we invented it; real EEG doesn’t come with that answer.

4