Simply EEGLAB

clean_rawdata & ASR

Station 3 · Lesson 5 · EEGLAB 2026.1

In the GUI

  1. ToolsReject data using Clean Rawdata and ASR
  2. Remove channel drift (data not already high-pass filtered)
  3. Process/remove channelsIgnore these channels (ECG, EMG, ...) EOG1 EOG2
  4. Remove channel if it is flat for more than (seconds)Max acceptable high-frequency noise std devMin acceptable correlation with nearby chans [0-1]
  5. Perform Artifact Subspace Reconstruction bad burst correction/rejectionMax acceptable 0.5 second window std dev 20
  6. Remove bad data periods (when uncheck, correct using ASR)Use Riemanian distance metric (not Euclidean) - beta
  7. Additional removal of bad data periodsAcceptable [min max] channel RMS range (+/- std dev)Maximum out-of-bound channels (%) -Inf 725
  8. Pop up scrolling data window with rejected data highlightedOK
  9. 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?

SettingValue
ASR threshold (Max acceptable 0.5 second window std dev)20
A stricter threshold5
The most aggressive value3
Remove or correctRemove
Remove channel drift (data not already high-pass filtered)Unchecked if you already filtered
Non-brain channels (EOG, ECG)Ignored
Use itAvoid it
Data with rare, huge bursts, such as movement or cable artifactsData that are already clean, such as D1
Before ICA, to give ICA cleaner training dataWhen every epoch matters and the bursts are few: remove them by eye instead
With a conservative threshold such as 20With 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.

Full lesson: https://simplyeeglab.pages.dev/en/lesson/asr/

Content license: CC BY-NC-SA 4.0 · MIT (code)

An independent learning site, not affiliated with EEGLAB or SCCN.