Skip to content

Exporting, Editing, and Importing EVENTLISTS

Marc Joanisse edited this page Feb 12, 2018 · 7 revisions

Exporting, Importing, and Editing an EVENTLIST

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. We plan to eventually include scripts for reading event information from Presentation and E-Prime data files directly into the EVENTLIST structure; at this point, you would need to write a custom script for this.

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 run the ERPLAB > Transfer eventinfo to EEG.type command (or its script equivalent) so that EEGLAB functions will have access to the new event information. Note that this will completely overwrite the previous event information; but that's OK, because you can save the dataset with the new EVENTLIST in a new file, saving the original file.

The second way to modify the events is to save the EventList as a text file. You can then edit this file with Matlab's text editor. 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 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 with the ERPLAB > EventList > Import EventList from Text File command.

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.

Clone this wiki locally