Figure 1
A Mock EEGLAB Window and Its Command-Line Equivalent
The same seven steps, plus the scroll plot, as typed commands. Click Run on each; the dataset panel below changes exactly as it did from the menu.
No current dataset
MATLAB Command Window
>> eeglab eeglab: adding "ERPLAB" v12 plugin
EEG.history
(empty)
The history, written out as a script. Paste it into a .m file and it reproduces every click.
The dataset and its EEG are simulated; the window runs seven fixed steps and does not process any real data.
What You Are Looking At
A GUI (graphical user interface) is a window with menus, buttons, and dialog boxes. Each menu item stands for one function. Choosing it opens a dialog, the fields you fill in become the function's arguments, and pressing Ok runs it. The window above is a plausible sketch of EEGLAB's main window, not a pixel copy. The panel on the left describes the current dataset, the Command Window on the right shows the command that each click generated, and the pane under it is EEG.history, the record EEGLAB keeps of everything done to the data so far.
Everything in EEGLAB lives in one MATLAB variable called EEG, a structure with named fields. EEG.data is the voltage, a matrix with one row per channel and one column per sample (or channels × samples × epochs once the data are cut up). EEG.srate is the sampling rate, EEG.nbchan the channel count, EEG.chanlocs the electrode positions, EEG.event the list of event codes and their times. A dataset is saved as a pair of files. By default the .set file holds every field except the voltages, which go in the .fdt file next to it. ERPLAB adds its own menu and its own variable, ERP, once averages have been computed.
Try This
- Open File and load the dataset. Read the left panel: 33 channels including HEOG and VEOG, 256 Hz, 76,800 frames (300 s of continuous data), and 412 events. Those four numbers are the first thing to check after any load.
- Work through Tools and ERPLAB in order: filter, re-reference, event list, bins, epochs, average. Watch the dataset name grow a suffix each time and the history pane grow a line.
- After extracting epochs, look at Frames per epoch and Epochs. The continuous 76,800 samples have become 120 epochs of 256 samples each, from −0.2 to 0.796 s.
- Open Plot and scroll the channel data. The blinks on Fp1 and VEOG are what artifact detection will hunt later.
- Switch to Same thing, no GUI, press Start over, and run the same commands. The panel fills in identically, and Copy history as script writes out the script that the next page starts from.
Why It Matters for the Pipeline
EEGLAB has both a GUI and a command line, and they call the same functions. The menu is a good way to learn what the options are, and it guarantees that every argument gets recorded, since each dialog writes its pop_ call into EEG.history. The command is the better way to do the same thing a second time, and the pipeline for this course needs to do it for every participant. In Lab 2 the first command is EEG = pop_loadset('filename','sub-001_N400.set','filepath',...). Typing EEG without a semicolon then prints the fields, so you can confirm that the channel count, sampling rate, number of points, and number of events match the recording (Delorme & Makeig, 2004; Lopez-Calderon & Luck, 2014). The ERP CORE data used here were recorded at 1024 Hz and are downsampled to 256 Hz before anything else (Kappenman et al., 2021).
References
Delorme, A., & Makeig, S. (2004). EEGLAB: An open source toolbox for analysis of single-trial EEG dynamics including independent component analysis. Journal of Neuroscience Methods, 134(1), 9–21. https://doi.org/10.1016/j.jneumeth.2003.10.009
Kappenman, E. S., Farrens, J. L., Zhang, W., Stewart, A. X., & Luck, S. J. (2021). ERP CORE: An open resource for human event-related potential research. NeuroImage, 225, Article 117465. https://doi.org/10.1016/j.neuroimage.2020.117465
Lopez-Calderon, J., & Luck, S. J. (2014). ERPLAB: An open-source toolbox for the analysis of event-related potentials. Frontiers in Human Neuroscience, 8, Article 213. https://doi.org/10.3389/fnhum.2014.00213