Simply EEGLAB
Re-referencing
Station 3 · Lesson 7 · EEGLAB 2026.1
In the GUI
- Channels per frame
- ToolsRe-reference the datapop_reref - average reference or re-reference data
- Current data reference state is:
unknown - Compute average reference
- Huber average ref. with threshold
- Exclude channel indices (EMG, EOG)...
EOG1EOG2 - Add old ref. channel back to the data
- OK
Re-referencing data - Overwrite it in memory (set=yes; unset=create a new dataset)
D1 main - FileSave current dataset as
- PlotChannel data (scroll)
EOG1EOG2
Script
EEG_before = EEG;
eogIdx = find(ismember({EEG.chanlocs.labels}, {'EOG1', 'EOG2'}));
EEG = pop_reref(EEG, [], 'exclude', eogIdx);
EEG.setname = 'D1 main';
scalpIdx = setdiff(1:EEG.nbchan, eogIdx);
fprintf('Reference: %s\n', EEG.ref);
fprintf('Largest sum over scalp channels: %g uV\n', max(abs(sum(EEG.data(scalpIdx, :), 1))));
oz = find(strcmp({EEG.chanlocs.labels}, 'Oz'));
t = 1:5*EEG.srate;
figure;
plot(t / EEG.srate, EEG_before.data(oz, t), t / EEG.srate, EEG.data(oz, t));
legend('Original reference (mastoid)', 'Average reference');
xlabel('Time (s)'); ylabel('Amplitude (uV)');
EEG = pop_saveset(EEG, 'filename', 'D1_main.set', 'filepath', pwd);Which value should I choose?
| Setting | Value |
|---|---|
| Reference for the ICA path and source analysis | Average reference |
| Reference for comparing with earlier ERP studies | The same reference as those studies, often linked mastoids |
| Excluded channels | EOG, ECG, and EMG channels |
| Adding the old reference channel back | Only if its location is defined in the channel editor |
| Huber | Not before ICA |
Check
- Main window
- The script check
- The eye channels did not change
- The scalp channels changed
For your Methods
Data were re-referenced to the average of all scalp channels (pop_reref, EEGLAB 2026.1); EOG channels were excluded from the reference.