EEGLAB Event Tutorial
20 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

EEGLAB Event Tutorial

Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
20 pages
English

Description

EEGLAB Event Tutorial EEGLAB Event Tutorial
Table of Contents
V. EEGLAB event Structure .............................................................................................................................1
V.1. Event processing in the EEGLAB GUI ...........................................................................................1
V.1.1. Event fields
V.1.2. Importing, adding, and modifying events ...............................................................................3
V.1.3. Selecting events ......................................................................................................................5
V.1.4. Using events for data processing ............................................................................................6
V.2. Event processing from the Matlab command line .........................................................................10
V.2.1. Accessing events from the line ............................................................................10
V.2.2. EEG.epoch structure .............................................................................................................15
V.2.3. Scripting ...............................................................................................................................16
i V. EEGLAB event Structure
V.1. Event processing in eeglab GUI
V.1.1. Event fields
V.1.2. Using the GUI to process events
V.1.2.1 Importing and adding events
V.1.2.2 Modifying events
V.1.2.3 ...

Sujets

Informations

Publié par
Nombre de lectures 306
Langue English
Poids de l'ouvrage 1 Mo

Exrait

EEGLAB Event Tutorial
EEGLAB Event Tutorial
Table of Contents
V. EEGLAB event Structure.............................................................................................................................1 V.1. Event processing in the EEGLAB GUI...........................................................................................1 V.1.1. Event fields.............................................................................................................................1 V.1.2. Importing, adding, and modifying events...............................................................................3 V.1.3. Selecting events......................................................................................................................5 V.1.4. Using events for data processing............................................................................................6 V.2. Event processing from the Matlab command line.........................................................................10 V.2.1. Accessing events from the command line............................................................................10 V.2.2. EEG.epoch structure.............................................................................................................15 V.2.3. Scripting...............................................................................................................................16
i
V. EEGLAB event Structure V.1. Event processing in eeglab GUI V.1.1. Event fields V.1.2. Using the GUI to process events V.1.2.1 Importing and adding events V.1.2.2 Modifying events V.1.2.3 Using events V.2 Event processing from the Matlab command line V.2.1. Accessing events from the command line V.2.1.1. Basic manipulation V.2.1.2. The urevent field and the urevent structure V.2.1.3. The Boundary event V.2.2. EEG.epoch structure V.2.3. Scripting
This tutorial complements information about EEGLAB event handling covered in other parts of the EEGLAB tutorial. It first describe how to import, modify, select, and visualize EEGLAB events, within the EEGLAB graphic interface. It then describes in more details the EEG.event , EEG.urevent , and related EEG.epoch structures, and discusses importing, editing, and using event information in EEGLAB scripts. We assume that readers are already familiar with the main EEGLAB tutorial as well as with the EEGLAB script tutorial . Important Note : The EEGLAB event structure has evolved through EEGLAB Version 4.4, after which we hope it may remain stable (note that functions processing events are backward compatible with old event structures). V.1. Event processing in the EEGLAB GUI V.1.1. Event fields The EEG event structure contains records of the experimental events that occurred while the data was being recorded, as well as structure handling events which are automatically inserted by EEGLAB. The experimental events can be imported into EEGLAB using its GUI: refer to II.2. (Importing event information for a continuous EEG dataset) for details. To view the information for an event, use menu Edit > Event values (see the window below, which shows events of the tutorial dataset after section I.5 on extracting data epochs).
V. EEGLAB event Structure
1
EEGLAB Event Tutorial
The "type" and "latency" fields are the most important EEGLAB event fields (see below). Some EEGLAB functions recognize and use these two fields for plotting events, sorting trials, etc. (Note: One can also process events lacking these fields, though this strongly limits the range of event processing possibilities). Other fields, including  "epoch" ,  "duration" ,  "urevent" , are also recognized by EEGLAB (they are created automatically during extracting of epochs, rejecting data, or storing event data). User−defined fields can have any other name that is relevant to the data (for example, "position" in the example above).
A short description of recognized event fields is given below. Further information can be found in the event scripting section in the next sections.
type − specifies the type of the event. For example, 'square' in the example above is a stimulus type, 'rt' is a subject button−press (i.e., reaction−time) event, etc... In continuous datasets, EEGLAB may add events of type "boundary" to specify data boundaries (breaks in the continuous data). The next section on event scripting provides more detailed information about this special type of event.
latency − contains event latencies. The latency information is displayed in seconds for continuous data, or in milliseconds relative to the epoch's time−locking event for epoched data. As we will see in the event scripting section, the latency information is stored internaly in data samples (points or EEGLAB 'pnts') relative to the beginning of the continuous data matrix (EEG.data).
duration − duration of the event. This information is displayed in seconds for continuous data, and in milliseconds for epoched data. Internally, duration is (also) stored in data samples (pnts).
V. EEGLAB event Structure
2
EEGLAB Event Tutorial urevent − contains indices of events in the original ('ur' in German) event structure. The first time events are imported, they are copied into a separate structure called the 'urevent' structure. This field is hidden in the graphic interface (above) since they should not be casually modified. epoch − indices of the data epochs (if any) the event falls within. Note: all event fields may contain either numbers or strings (except for latency , duration , urevent and epoch which must contain numbers). For instance, the type field can contain a number (i.e. 1,2, etc.) or a string (i.e. 'square', 'rt', etc.). However, EEGLAB cannot process a mixture of both f o r m a t s ( n u m e r i c a n d s t r i n g ) f o r o n e f i e l d . A f u n c t i o n t h a t c h e c k s t h e e v e n t s t r u c t u r e ( eeg_checkset() with flag "eventconsistency"), called each time a dataset is modified, enforces each field's contents to remain consistent, automatically converting numeric values to strings if necessary. This constraint was imposed to speed up event manipulation by a factor of about 1000X. V.1.2. Importing, adding, and modifying events Events can be imported into EEGLAB by selecting menu item File > Import event info . To find out more about this option, refer to II.2. Importing event information for a continuous EEG dataset . The same method may also be used to add new events to a pre−existing event table. To insert new events manually, select menu item Edit > Event values . Click on the Insert event button to add a new event before the current event. The Append event button adds an event after the current event. After a new event has been inserted or appended, its event−field information can immediately be changed in the corresponding boxes. For instance, to insert a event of type " new " 500 ms after the onset of the time−locking stimulus, enter "new" in the event "type" edit box, and 500 in the event "latency" edit box. Note : If you then click on the cancel button, none of the new information will be saved.
V.1.2. Importing, adding, and modifying events
3
EEGLAB Event Tutorial
After you press OK , the events may be resorted (events must always be in order of increasing latency), and some field contents may be modified to ensure consistency, as indicated at the end of the previous section. In the graphic interface above, all experimental events can be manually modified by simply typing the new values in the edit window for each field. Events may also be deleted ( Delete event button) or resorted (see the bottom part of the window). Resorting events is only for viewing purposes (as EEGLAB cannot process an event structure that is not sorted by increasing event latency). Another way to insert new events is to select menu item Edit > Event fields as shown below. Through its graphic interface, you may add new fields and import Matlab arrays or text files to fill them. For instance, to add a test field containing only "0"s, enter "test" in the edit box of the " Edit field " column. Then enter "0" in the " file/array " column and press OK . Using this window, you may also delete event fields (last column) or rename them (window bottom). Finally you may change the description of event fields by clicking on buttons in the " Field description " column. (Note: It is efficient to enter event field description information in the first dataset you create for an experiment, and then to copy this information to subsequent datasets from the same experiment. Entering event field descriptions will allow you or others who may explore the same data later (perhaps when new analysis tools become available or of interest) to quickly grasp the meaning of the event information.
V.1.2. Importing, adding, and modifying events
4
EEGLAB Event Tutorial
V.1.3. Selecting events To select specific events, use menu item Edit > Select epochs/events . This can be exploited to compare different types of data epochs, as described in section I.7.1. Selecting events and epochs for two conditions . The link above describes a basic event selection process. You can also specify more complex combinations of event field selections and ranges as the criterion for selecting trials. For instance, the window below would select epochs containing events of type rt , not following stimuli presented at 'position' 1, in which subject reaction time latency is between 0 ms and 400 ms, from among the 40 first epochs of the parent dataset. Note the option set above the Cancel button (below): " Remove epochs not referenced by any selected event ". If this checkbox were left unset and the checkbox " Keep only selected events and remove all other events ", the function would simply select the specified events but would not remove epochs not containing those events. Note : To select events outside the given range, check the " Select events NOT selected above " box to the right of the field range entry. It is possible to rename the type of the selected events (while (optionally) keeping the old event type name as a new field) using the last two edit boxes.
V.1.3. Selecting events
5
EEGLAB Event Tutorial
V.1.4. Using events for data processing
Event information can be used in several EEGLAB processing functions as listed below.
1. The event type field can be used to extract data epochs, as described in section I.5. Extracting data epochs . Select menu option Tools > extract epochs to open the window below.
V.1.4. Using events for data processing
6
EEGLAB Event Tutorial This operation will extract epochs of duration one second before to two seconds after all events of type "square".
2. Events can also be used for making ERP−image plots. Select Plot > Channel ERP image . This brings up the pop_erpimage() window (below).
The "Epoch−sorting field" button allows you to choose any of the event fields as  the sorting criteria. The next button, "Event type(s)" , enables you to choose only a subset of events. In this example, events of type "square" are sorted by their position field value. For more details see I.8.2. Plotting ERP images .
3. Event statistics can be plotted with regard to different event fields. For example, selecting menu option Plot > Data statistic > Event statistic the following window pops up.
V.1.4. Using events for data processing
7
EEGLAB Event Tutorial
Entering 'rt' as the event type, and "[250 500]" (ms) as the event latency range, and pressing OK will show the following 'rt' event statistics.
V.1.4. Using events for data processing
8
EEGLAB Event Tutorial
See the rejection tutorial on data channel statistics ( III.1.2 ) for more information on this graphic interface.
4. Most EEGLAB functions take events into account. For instance, functions that remove data ( pop_eegplot() , pop_select() ) will also remove events that occur during the data removed (though not their corresponding urevents). Functions that process continuous data ( pop_spectopo() , pop_resample() , pop_mergeset() ) will take into account data boundary events (stored as data events by EEGLAB when portions of the data are removed or when datasets are concatenated).
V.1.4. Using events for data processing
9
  • Accueil Accueil
  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • BD BD
  • Documents Documents