There is no single correct EEG preprocessing pipeline. Different paradigms need different filters, and two well-run labs can order their steps differently and both be right. What is not optional is knowing what each step did and being able to say so. Most irreproducible EEG results come from a preprocessing choice nobody wrote down.
Below is the conventional order, with the reason for each step and the points where reordering changes the result.
The conventional order
| # | Step | Why |
|---|---|---|
| 1 | Import and inspect | Confirm sampling rate, channel names, montage and event markers before changing anything. |
| 2 | Bandpass filter | Remove slow drifts and high-frequency noise. Common ranges: 0.1–40 Hz for ERPs, 1–40 Hz before ICA, 8–30 Hz for motor imagery. |
| 3 | Line-noise removal | Notch at 50 or 60 Hz (and harmonics) if the bandpass does not already exclude it. |
| 4 | Bad channel detection | Drop flat, railing or noisy electrodes before they contaminate re-referencing and ICA. |
| 5 | Re-reference | Average reference or another scheme suited to the montage and question. |
| 6 | ICA artifact removal | Separate and remove blink, eye-movement, cardiac and muscle components. |
| 7 | Epoching | Cut trials around events with a window suited to the response. |
| 8 | Baseline correction | Subtract or normalise against a pre-stimulus window. |
| 9 | Trial rejection | Drop trials still contaminated after cleaning. |
Where the order genuinely matters
Bad channels before average reference
A dead or noisy channel in the average spreads its noise into every other channel.
Bad channels before ICA
A railing channel can consume components and degrade the decomposition.
High-pass before ICA
Slow drifts hurt ICA. A common approach is to fit ICA on a 1 Hz high-passed copy and apply the solution to the less filtered data.
Normalisation and the split
Anything fitted to the data, including scalers, CSP and feature selection, must be fitted inside the training folds, or the evaluation leaks.
How BCILattice runs it
Filtering is the one pre-analysis stage, and the Analysis Suite's Prepare section covers the rest: ICA Review, Channel Quality, Epoching (with baseline correction and automatic or fixed-threshold rejection), Normalization and Augmentation. The sidebar shows the conventional order, and the steps can be dragged into a different one. Some labs screen channels before ICA and others after, and the app remembers your order.
Every step reads a named stage and writes a new one, so nothing overwrites the recording and two settings can be compared side by side. A Methods button drafts a publication methods paragraph from what the recording has actually had done to it.
Questions
What are the steps of EEG preprocessing?
Typically: inspect the data, bandpass filter, remove line noise, detect and drop bad channels, re-reference, remove artifacts with ICA, epoch around events, apply baseline correction, and reject remaining bad trials.
Should I filter before or after ICA?
Before. ICA works better on data without slow drifts, so a high-pass of around 1 Hz is common before fitting ICA. The ICA solution can then be applied to data filtered less aggressively.
Which reference should I use for EEG?
The average reference is a common default for dense montages. Linked mastoids or a specific electrode are common in some ERP traditions. Choose by paradigm and montage, and report it.
How do I preprocess EEG without coding?
Use a graphical tool. BCILattice runs filtering, ICA review, channel quality, epoching, baseline correction and rejection as visual steps, previewed on one file and then applied in batch to the rest.
Read the reference
Related
EEG Artifact Removal: Eye Blinks, Muscle and ICA
Blinks, muscle tension and line noise are often larger than the brain signal you want. Removing them is a sequence of decisions, and each one should be visible and reversible.
EEG Signal Processing Software
Filtering, referencing, resampling and normalization, each writing a named stage that carries the settings it ran with — so a downstream result can always be traced back to the conditioning that produced it.
EEG Feature Extraction: Which Features to Use
A feature is a reduction of a trial to a number. The right ones depend on where the signal lives (time, frequency, space or the links between channels), and the wrong ones multiply until the model overfits.
How EEG Works: What an EEG Measures
Electroencephalography (EEG) records the brain's electrical activity with electrodes on the scalp. It has millisecond timing and centimetre-scale blur, and knowing both is the key to using it well.