Simply EEGLAB
clean_rawdata & ASR
Station 3 · Lesson 5 · EEGLAB 2026.1
In the GUI
- ToolsReject data using Clean Rawdata and ASR
- Remove channel drift (data not already high-pass filtered)
- Process/remove channelsIgnore these channels (ECG, EMG, ...)
EOG1 EOG2 - Remove channel if it is flat for more than (seconds)Max acceptable high-frequency noise std devMin acceptable correlation with nearby chans [0-1]
- Perform Artifact Subspace Reconstruction bad burst correction/rejectionMax acceptable 0.5 second window std dev
20 - Remove bad data periods (when uncheck, correct using ASR)Use Riemanian distance metric (not Euclidean) - beta
- Additional removal of bad data periodsAcceptable [min max] channel RMS range (+/- std dev)Maximum out-of-bound channels (%)
-Inf 725 - Pop up scrolling data window with rejected data highlightedOK
- Frames per epochEvents
D1 asrD1 hp0.1 notch60
Script
EEG_asr = pop_clean_rawdata(EEG, 'FlatlineCriterion', 'off', 'ChannelCriterion', 'off', ...
'LineNoiseCriterion', 'off', 'Highpass', 'off', 'BurstCriterion', 20, ...
'WindowCriterion', 0.25, 'BurstRejection', 'on', 'Distance', 'Euclidian', ...
'WindowCriterionTolerances', [-Inf 7], 'channels_ignore', {'EOG1', 'EOG2'});
EEG_asr.setname = 'D1 asr';
fprintf('Data kept: %.1f of %.1f s (%.1f%%)\n', EEG_asr.pnts / EEG_asr.srate, ...
EEG.pnts / EEG.srate, 100 * EEG_asr.pnts / EEG.pnts);
fprintf('Boundary events: %d\n', sum(strcmp({EEG_asr.event.type}, 'boundary')));
epBefore = pop_epoch(EEG, {'square'}, [-0.2 0.8]);
epAfter = pop_epoch(EEG_asr, {'square'}, [-0.2 0.8]);
fprintf('Epochs around square: %d before ASR, %d after\n', epBefore.trials, epAfter.trials);
vis_artifacts(EEG_asr, EEG);Which value should I choose?
| Setting | Value |
|---|---|
| ASR threshold (Max acceptable 0.5 second window std dev) | 20 |
| A stricter threshold | 5 |
| The most aggressive value | 3 |
| Remove or correct | Remove |
| Remove channel drift (data not already high-pass filtered) | Unchecked if you already filtered |
| Non-brain channels (EOG, ECG) | Ignored |
| Use it | Avoid it |
| Data with rare, huge bursts, such as movement or cable artifacts | Data that are already clean, such as D1 |
| Before ICA, to give ICA cleaner training data | When every epoch matters and the bursts are few: remove them by eye instead |
| With a conservative threshold such as 20 | With a low threshold that removes blinks, which ICA can correct |
Check
- The scrolling window
- The script check
- The events increased
- The path is unchanged
For your Methods
High-amplitude bursts were identified with Artifact Subspace Reconstruction (burst criterion 20 SD; clean_rawdata plugin 2.11, EEGLAB 2026.1), and the affected periods were removed together with windows in which more than 25% of channels exceeded 7 SD ([N] s, [P]% of the data); EOG channels were excluded.