-
Notifications
You must be signed in to change notification settings - Fork 73
ERPLAB Studio: Creating An EVENTLIST
This page describes how to create an EventList.
You must create an EventList structure for a given dataset to use it with ERPLAB (see the EventList documentation for more details). This is usually done on the continuous EEG data, prior to using any ERPLAB routines to process the dataset. An EventList is created from the current dataset by going to the EventList panel and clicking Create. You will then see the window shown below.
You simply click CREATE in this window, and the events in EEG.event will be stored in the EVENTLIST structure, which is then added onto the current EEGset.
Some systems (e.g., EGI and Brain Products) use text strings rather than numeric values as event codes. In some systems, this is very subtle (e.g., the codes might be 'S21', which looks like a number but isn't). ERPLAB allows you to have both numeric codes and text labels for each event, but you must have numeric codes to use the BINLISTER tool.
If you have text strings for your events, you can convert them to numeric codes. This is easy if your string values contain numbers (e.g., 'S21'). In this situation, selecting Create numeric equivalents of nonnumeric event codes when possible will convert the strings into numeric values (e.g., 'S21' is converted to the number 21) . You can also accomplish this from a script (or from the command line) using a function called letterkilla (i.e., you would type EEG = letterkilla(EEG); eeglab redraw;). For more complex situations, you can click the Advanced button, as described next.
Clicking the Advanced button brings up the window shown below. This window allows you to create a numeric code for each text value or create a text value for each numeric value. You can also assign events to bins with this window (if you have a simple 1:1 mapping between event codes and bins).
The example shown in the screenshot above is from a simple oddball experiment in which the standard stimulus corresponds to an event code of 122, the target corresponds to an event code of 112, target responses correspond to an event code of 9, and standard responses correspond to an event code of 8. Each occurrence of the target is assigned to Bin 1 (labeled "target bin") and each occurrence of the standard is assigned to Bin 2 (labeled "standard bin"). The response event codes were not assigned to any bin. To set up this mapping, a table was created (shown in the left portion of the window).
To assign event labels to your event codes (or vice versa), you begin by using the GUI to build a table in which each line specifies one type of event, giving the event code and event label for that event type (and, optionally, a bin number and bin description). Once you have built the table and click APPLY, the program will find each event matching the event code and add the corresponding label in the EVENTLIST.eventinfo structure (or vice versa if you have event labels but not event codes). If you do not provide a label for a given event code, the event code will still appear in the EVENTLIST.eventinfo structure. In addition, if you provide bin information, the EVENTLIST structure will contain bin assignments for each event for which a bin has been defined. It is fine if some events are not assigned to a bin (e.g., the response events in the screenshot above).
The table is created as follows. When you begin, the only line in the table (shown in the left portion of the window) will be new line, and it will be highlighted. You can then enter an event code, an event label, and bin number, and a bin description in the right portion of the window. You then click on update line and it will create a line in the table with that event code, event label, bin number, and bin description. The bin number and bin description are optional; in most cases, you will not assign bins at this stage (the typical method is described in the next section). The screen shot shows how the window looks after several events have been described. To edit a line, simply click on it and update the values for that line; you must then click update line to update the values in the current line.
Once you have created the table, you must save it as a file (this will allow you to use it again, either for the same dataset or for a different dataset from another subject). To do this, simply click save list. To open a previously saved list, simply click open list. Once you have the list, you can create the EventList structure by clicking the UPDATE button. You can easily create this list with Matlab's text editor instead of using the Create Eventlist GUI; if you use the GUI to create a simple table, you will readily see the format for this table.
There are two important options. The first is Create EventList text file output. Selecting this option (and specifying a filename) will save a copy of the EventList structure in a text file. In the next section, we will take a look at the contents of an EventList text file, which will give you a better idea of what information is stored in the EventList structure.
The second option is Transfer EVENTLIST info to EEG.event. You will usually want to do this, because it gives you the ability to use the text labels you have just created for each event code when viewing the EEG. If you select this option, it will cause another window to pop up (after you click APPLY). This window (shown in the screenshot below) allows you to choose whether the event info in the EEG structure will contain the numeric event codes, the code labels, or the bin labels for each event (which then determines how event codes are labeled when you plot the data). You will usually want to select Code Labels.
Instead of event codes or event labels, you can choose to store Bin Labels in the EEG structure. This alternative applies only after you have assigned events to bins (either at this stage or by means of the BINLISTER routine at a later stage). The bin label is a string that indicates the bin to which the epoch has been assigned. The original event label or event is also provided (in parentheses) for your information. For example, if an event code of 100 was assigned to Bin 1, the bin label for this event code would be changed to B1(100). If a given event code is assigned to multiple bins, the bins are separated by commas. That is, if an event code of 100 was assigned to Bins 1 and 7, the label for this event code would be changed to B1,7(100). If event labels are present, they are used inside of the parentheses instead of event codes (e.g., B1,7(target)).