task 2 - university of california, san diego...eeglab workshop iii, nov. 15-18, 2006, singapore:...
TRANSCRIPT
![Page 1: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/1.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 1
Data preprocessing and epoching
Task 1Import raw dataRe-reference data Scroll channel data
Task 2Import channel location file
Task 3Import data events
Task 4Extract data epochsSelect epochs/events
Exercise...
![Page 2: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/2.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2
Data preprocessing and epoching
Task 1Import raw dataRe-reference data Scroll channel data
Task 2Import channel location file
Task 3Import data events
Task 4Extract data epochsSelect epochs/events
Exercise...
![Page 3: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/3.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 3
The EEGLAB Matlab software
60 menus, more than 300 Matlab functions and more than 50,000 lines of code
main graphic interface
![Page 4: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/4.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 4
Importing a dataset
![Page 5: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/5.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 5
Import raw data
![Page 6: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/6.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 6
Imported EEG data
![Page 7: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/7.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 7
Comments
![Page 8: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/8.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 8
Re-reference data
Specify the reference scheme of imported data
![Page 9: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/9.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 9
Rereferencing, cont'd
EEG = pop_reref( EEG, 16, 'refstate',0);
2 re-reference
choices
![Page 10: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/10.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 10
Save new dataset, keep old one
[ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG,…EEG, 1, 'setname', 'rereferenced data');
![Page 11: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/11.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 11
Multiple active datasets (ALLEEG)
![Page 12: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/12.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 12
Scroll data
>> pop_eegplot(EEG,1,1,1);
![Page 13: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/13.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 13
Scroll channel data
scaling
channels,time,
events
events
sec/epoch
![Page 14: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/14.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 14
Data preprocessing and epoching
Task 1Import raw dataRe-reference data Scroll channel data
Task 2Import channel location file
Task 3Import data events
Task 4Extract data epochsSelect epochs/events
Exercise...
![Page 15: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/15.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 15
• Use channel names and automaticallyassign channel location
• Import channel location file• Modify/stretch/rotate channel locations• Set channel types…
Import channel locations
![Page 16: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/16.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 16
7 file formats supported (Polhemus, BESA, …)
![Page 17: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/17.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 17
![Page 18: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/18.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 18
Import channel locations
![Page 19: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/19.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 19
Data preprocessing and epoching
Task 1Import raw dataRe-reference data Scroll channel data
Task 2Import channel location file
Task 3Import data events
Task 4Extract data epochsSelect epochs/events
Exercise...
![Page 20: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/20.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 20
• Import event from Matlab array or ASCII file• Import event from data channel• Import event from Presentation event file
34
![Page 21: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/21.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 21
![Page 22: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/22.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 22
Import data events
![Page 23: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/23.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 23
Event 'type' and 'latency' are recognized fields
Review/edit event values
![Page 24: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/24.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 24
1) input original 'type' code2) input new 'type' code3) keep all other events!
Renaming events
![Page 25: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/25.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 25
Renaming events
![Page 26: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/26.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 26
…
Check alignment between pre-existing (old) and loaded event latencies:
Old event latencies (10 first): 10789 21315 31375 41902 51962 62489 ...
New event latencies (10 first): 10789 21315 31376 41902 51963 62489 ...
Best sampling rate ratio found is 0.9999895. Below latencies after adjustment
Old event latencies (10 first): 10789 21315 31376 41902 51963 62488 ...
New event latencies (10 first): 10789 21315 31375 41902 51962 62489 ...
…
Alternative method for importing events: Import events from event file
![Page 27: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/27.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 27
Scroll data with events
![Page 28: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/28.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 28
Data preprocessing and epoching
Task 1Import raw dataRe-reference data Scroll channel data
Task 2Import channel location file
Task 3Import data events
Task 4Extract data epochsSelect epochs/events
Exercise...
![Page 29: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/29.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 29
>> eeg_eventtypes(EEG)
boundary 1
bp1 183
bp4 184
face 182
object 182
Extract epochs
![Page 30: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/30.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 30
Extract epochs
>> EEG = pop_epoch(EEG,{'face' 'object'},[-1 2],...
'newname','faces_3_chans removed epochs',...
'epochinfo','yes');>> EEG = pop_rmbase(EEG,[-1000 0]);
>> [ALLEEG EEG CURRENTSET] = pop_newset(ALLEEG,EEG,...
CURRENTSET,'setname','faces_3_chans removed epochs');
![Page 31: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/31.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 31
Create new event field
EEG = pop_editeventfield( EEG,…'indices','1:732','latencyinfo',…[],'typeinfo',[],'duration','0');[ALLEEG EEG] = eeg_store(ALLEEG,…EEG, CURRENTSET);
![Page 32: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/32.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 32
Event durations
Color denotes
event duration
![Page 33: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/33.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 33
Select epochs
>> EEG=pop_selectevent(EEG,'type',{'face'},'deleteevents', ...'off','deleteepochs','on');
>> [ALLEEG EEG CURRENTSET]=pop_newset(ALLEEG,EEG,4,...'setname','faces only epochs');
![Page 34: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/34.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 34
Save dataset (optional)
face epochs
Or save later from menu
![Page 35: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/35.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 35
![Page 36: Task 2 - University of California, San Diego...EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 2 Data preprocessing and epoching Task](https://reader033.vdocuments.us/reader033/viewer/2022042118/5e96d1e09ab97f0c2c3e2e42/html5/thumbnails/36.jpg)
EEGLAB Workshop III, Nov. 15-18, 2006, Singapore: Julie Onton – Data import and preprocessing 36
Exercise
• Load dataset '…/data/faces_3.set'• Scroll channel data• remove channel location information. Type:
• >> EEG.chanlocs = [];• >> eeglab redraw
• Import electrode locations 'faces_3.locs' from '…/data/'– Plot in channel locations in 2D/3D– Try rotating axis– Optimize the head center
• Review events in pop_menu (Edit Event values)– Practice renaming an event type
• Do not save your changes!!