Simply EEGLAB
Precomputing measures
Station 8 · Lesson 5 · EEGLAB 2026.1
In the GUI
- StudyPrecompute channel measuresPre-compute channel measures for STUDY 'Go-nogo animal (mine)'
- Spherical interpolation of missing channels (performed after optional ICA removal below)
- Remove ICA artifactual components pre-tagged in each dataset
- Remove artifactual ICA cluster or clusters (hold shift key)
- ERPs...Select parameters for ERP
- Baseline (min max) ("rmbase")Epoch start (sec)Ok
-1000 0 - Power spectrum
'specmode', 'fft', 'logtrials', 'off' - ERSPsITCs
- Overwrite files on diskYes
WARNING: SOME DATAFILES ALREADY EXIST, OVERWRITE THEM?animal.studyanimal_mine.study - Ok
Script
baseline = [round(ALLEEG(1).xmin*1000) 0]; % from the epoch start to 0 ms
[STUDY, ALLEEG] = std_precomp(STUDY, ALLEEG, {}, 'savetrials', 'on', 'interp', 'on', 'recompute', 'on', ...
'erp', 'on', 'erpparams', {'rmbase', baseline}, ...
'spec', 'on', 'specparams', {'specmode', 'fft', 'logtrials', 'off'}, ...
'ersp', 'on', 'itc', 'on', 'erspparams', {'cycles', [3 0.8], 'freqs', [3 30], 'nfreqs', 20, 'ntimesout', 50});
STUDY = pop_savestudy(STUDY, ALLEEG, 'savemode', 'resave');
first = STUDY.datasetinfo(1);
measureFiles = dir(fullfile(first.filepath, [first.subject '.dat*']));
for k = 1:numel(measureFiles)
fprintf('%-24s %8.1f MB\n', measureFiles(k).name, measureFiles(k).bytes/1e6);
end
fprintf('Channel groups in the STUDY: %d\n', numel(STUDY.changrp));Which value should I choose?
| Option | In this lesson | General rule |
|---|---|---|
Baseline (rmbase) | From the epoch start to 0 ms | The same baseline you used for each participant. If the data are already corrected, a second correction does no harm. |
Interpolation (interp) | on, as in the window | In the script its default is off, so write it out. It is better to interpolate missing channels in each participant's file before the STUDY, where you can see them. |
ICA removal (rmicacomps) | off | on only if components are flagged in every file and were not removed from the data before. |
Spectrum (specparams) | 'specmode', 'fft', 'logtrials', 'off' | The default suits a first analysis. Change it only for a methodological reason. |
ERSP (erspparams) | Every channel, 20 frequencies from 3 to 30 Hz, 50 time points | A finer grid only for the frequencies and times in your research question. Keep every channel in EEGLAB 2026.1. |
Save trials (savetrials) | on | Fixed: current EEGLAB has no other choice, and the window always adds it. |
Recompute (recompute) | on | on whenever you change any option, otherwise EEGLAB reads the old files. |
For your Methods
Channel ERPs and spectra were precomputed for each participant and condition (std_precomp), with baseline correction from [−1000] to 0 ms; with spherical interpolation of any missing channels enabled; event-related spectral perturbations were computed at every channel for [20] frequencies from [3] to [30] Hz.