ERPLAB Studio: Exporting, Editing, and Importing EVENTLISTS - ucdavis/erplab GitHub Wiki

A particularly important aspect of the EVENTLIST structure is that events can be modified and then read back into the current dataset, replacing the previous event code information in the EEG structure. This makes it possible to add to your dataset information about stimuli, responses, physiological variables, or anything else that is not available from the event codes that were originally stored in the EEG file. For example, studies of motor processing often include EMG recordings, and the EVENTLIST structure makes it easy to convert EMG bursts in the EEG structure into event codes that can be used for EMG-locked averaging. It can also be used to merge events from a stimulus presentation system into the EEG structure. For example, the data file created by a stimulus presentation program might have information about responses that is not directly available in the EEG data file, and the EVENTLIST structure provides a conduit for adding this information into a dataset (via a custom Matlab script).

There are two basic ways to modify the events in a dataset. First, one can directly modify the EVENTLIST structure (either from the Matlab command line or from a custom Matlab script). After you've done this, you may wish to transfer the new events to EEG.event so that EEGLAB functions will have access to the new event information. This is accomplished by going to the the EventList panel in the EEG tab and clicking Transfer event info to EEG.event.

The second way to modify the events is to save the EventList as a text file or .xls file. You can then edit this file with Matlab's text editor or a spreadsheet program such as Excel. For example, if you gave the subject the wrong instructions for a portion of the data collection period, you could edit the EventList File to change the enable value to zero for the relevant event codes. Similarly, you could use the text editor or spreadsheet program to perform a global search-and-replace to modify a particular event code value. You could also manually enter boundary events in this manner. If you need to do something more complicated, you could read the EventList text file into a program (in Matlab or some other programming environment), modify it, and then save the output in a new text file. After modifying the text file, you can read it back into the EVENTLIST structure for the current dataset using the EventList panel.

Important note: The header information at the beginning of an EventList text file should not be edited. Any changes you make to this information will be ignored when the EventList file is read back into ERPLAB.

To make your life easier, ERPLAB does not require that the events in the EventList text file are listed in order of occurrence. Thus, you can add any new events at the end of the file rather than inserting them at the appropriate place. ERPLAB will use the onset time of each event to determine the order of events. The event number and the time difference are ignored when you import the text file. ERPLAB will renumber the events after you have imported them.

⚠️ **GitHub.com Fallback** ⚠️