EEGLAB Migration Notes#
EEGPrep is a Python port, not a MATLAB compatibility layer. Use these notes when translating EEGLAB habits into EEGPrep scripts and GUI workflows.
What Carries Over#
EEGLAB habit |
EEGPrep equivalent |
|---|---|
|
Same public names, Python arguments, and replayable command strings. |
|
Same workspace names inside |
GUI menu action then command history |
GUI actions update |
|
Same dictionary field names. |
Bundled plugins |
clean_rawdata, FIRFilt, ICLabel, DIPFIT, and EEG-BIDS are in-package Python ports or explicit standalone boundaries. |
STUDY |
Implemented as EEGPrep-owned dictionaries and JSON-safe measure caches. |
What Changes#
Topic |
Migration rule |
|---|---|
Arrays |
Use Python/NumPy zero-based indexing when slicing data. |
User-facing selectors |
Keep channel, component, dataset, and epoch numbers one-based in GUI dialogs and command strings unless a function documents otherwise. |
Globals |
EEGPrep functions take explicit inputs. The shared console namespace is session state, not a hidden global dependency. |
Runtime EEGLAB checkout |
Installed EEGPrep does not read from |
Optional toolboxes |
MATLAB-only LIMO, FieldTrip STUDY source statistics, MRI BEM creation, AFNI atlas clipping, and unavailable ICLabel network artifacts fail clearly instead of being faked. |
Scripts |
Assign return values explicitly outside |
Command Translation Examples#
Migration intent |
EEGPrep Python |
|---|---|
Load a dataset |
|
Filter |
|
Resample |
|
Average reference |
|
Epoch |
|
Run ICA |
|
Classify ICs |
|
Create a STUDY |
|
History Replay#
In MATLAB EEGLAB, menu commands appear in the MATLAB command window. In
EEGPrep, use LASTCOM and ALLCOM:
EEG, LASTCOM = pop_resample(EEG, 64, return_com=True)
ALLCOM.append(LASTCOM)
Inside eegprep-console, a bare call can update the current dataset:
pop_resample(EEG, 64)
In normal Python, assign the return value:
EEG = pop_resample(EEG, 64)
Indexing Boundaries#
EEGPrep intentionally keeps both conventions visible:
Python arrays are zero-based:
EEG["data"][0, :]is the first channel.GUI channel/component/dataset selectors are one-based.
Event
latencyfields are sample positions in the EEGLAB-facing event model.icachansindis normalized after loading so internal indexing is consistent, then converted back when saving.
Plugin Migration#
Bundled plugins are importable from eegprep:
from eegprep import pop_clean_rawdata, pop_eegfiltnew, pop_iclabel, pop_dipfit_settings
External EEGLAB MATLAB plugins are not loaded by path. EEGPrep extensions are
normal Python packages discovered through the eegprep.extensions entry
point. See Bundled Plugins and Extensions and External Extensions for the package format.
When to Stay in MNE or MATLAB#
Use MNE-Python when your analysis depends on MNE-native object workflows, forward models, reports, or statistics. Use MATLAB EEGLAB when you need an unported MATLAB-only plugin or toolbox today. Use EEGPrep when you want familiar preprocessing and review workflows in Python with standalone package behavior.