Skip to content

Important Background Concepts and Data Structures

David Railton Garrett edited this page Apr 10, 2024 · 7 revisions

This section of the manual introduces some key concepts that you absolutely must know to use ERPLAB Studio or ERPLAB Classic.

Datasets/EEGsets and the EEG Structure. The EEG from a single session is stored in an EEGLAB structure called a dataset (also called an EEGset). Datasets can be stored on your hard drive and/or loaded into RAM. Multiple datasets can be loaded into EEGLAB/ERPLAB at the same time. One dataset is marked as the current dataset.

Each processing step typically uses the current dataset as the input, creates a new dataset, and then makes the new dataset the current dataset. For example, filtering the EEG data in the current dataset would create a new filtered dataset, which would then become the current dataset. This is a convenient system, because it allows the user to apply a series of processing steps to a set of EEG data, save the intermediate steps in RAM (with or without storing them as files on disk) and then quickly move back and forth between them. Some operations allow you to either update the current dataset or create a new dataset.

In ERPLAB Studio, the loaded datasets are available from the EEGsets panel. This panel also allows you to import data from a wide variety of formats, rename the EEGsets, etc. (see screenshot).

EEGsets Panel

In ERPLAB Classic, the loaded datasets are available from the Datasets menu (see screenshot). Datasets can be opened, saved, and cleared from the File menu.

Datasets Menu

Deep background: All the datasets in RAM are stored in a Matlab variable named ALLEEG, and the current dataset is also stored in a variable named EEG. This structure is inherited and extended by ERPLAB, and analogous structures called ALLERP and ERP are used by ERPLAB to store averaged ERP waveforms. ERPLAB also uses an EVENTLIST structure that provides a link between the EEG and ERP structures. These data structures are at the core of the operation of ERPLAB. You will access these structures directly if you write Matlab scripts, and you will access them indirectly when you use the GUI.

Bins. To understand how ERPLAB stores ERPs, it is first necessary to understand the concept of a bin. A bin is a set of averaged ERP waveforms, one for each electrode site, which were created by averaging together a specific set of trials. A simple oddball experiment, for example, might have one bin for the targets and another bin for the standards. However, a sophisticated experiment might have dozens of different bins, with a given bin being something like "Digits preceded by letters followed by a correct response between 200 and 1000 ms, in a condition in which digits are rare and letters are frequent." Many bins can be stored together in a single ERPset (and then saved as a single file).

A single bin within ERPset is an Electrodes x Time Points matrix. The set of bins within an ERP structure adds a third dimension to this matrix (Electrodes x Time Points x Bins). In addition to this 3-D structure, the ERP structure contains a header that specifies the names of the bins, the names and locations of the electrodes, the sampling rate, etc. All of the bins within an ERP structure must have the same number of electrodes and time points so that the data matrix is a complete multidimensional array. Each ERPLAB processing step that operates on an ERPset creates a new ERPset (e.g., filtering, re-referencing, creating difference waves). One ERPset is the current ERPset at a given time, but many ERPsets may be loaded at a given time, and the user can select among them via the ERPsets panel (in ERPLAB Studio) or the ERPsets menu (in ERPLAB Classic).

ERPsets Panel

ERPsets Menu

Event Codes. ERPLAB uses the term event code to refer to the code that marks the onset of an event in the EEG. An event code is just like a "trigger code," "stimulus code," or "marker" in other systems, in that it marks the time of a given event and the identity of that event. However, it is not quite the same as in some systems, because the software does not make any internal distinction between stimulus events, response events, or any other kind of events. The user has total control over how a given event is treated, which provides greater flexibility. Note that some data acquisition systems (e.g., Brain Products and EGI) use text strings rather than numeric codes. ERPLAB currently requires numeric codes, and you can convert from strings to numbers when you create the EVENTLIST stucture (as described next).

The EVENTLIST Structure. An EVENTLIST is a simple and compact structure created by ERPLAB that contains information about all of the events in an EEG structure (typically stimuli and responses, but it can also include eye movements, EMG bursts, etc.). ERPLAB has powerful tools for assigning events to bins, and the EVENTLIST structure plays a key role in this process. It can also be used as a convenient way of inserting, deleting, and changing event codes (e.g., merging response information that was saved by a stimulus presentation program with EEG data stored in a dataset). You can create this structure and add it to the current EEG structure using the EventList panel in ERPLAB Studio and with ERPLAB > EventList > Create EEG EVENTLIST in ERPLAB Classic.

Note for ERPSS users: The EVENTLIST combines the functionality of the log and binlist files. It contains all event information along with information about the bin or bins to which each event is assigned.

Clone this wiki locally