| POP_SELECTEVENT | Find events in an EEG dataset. If the dataset is the only input, a window pops up to ask for the relevant parameter values. |
| Usage: | >> [EEGOUT,event_indices] = pop_selectevent( EEG, 'key1', value1, 'key2', value2, ... ); |
| Input: | |
EEG |
EEG dataset |
| Optional inputs: | |
'type' |
[type_range] event type(s) to include Ex: 'type',3 or [2 3 5] or 1:10 |
'omittype' |
[type_range], type(s) of events to exclude |
'latency' |
[latency_range] latency range of events to include Ex: 'latency','400 <= 700' Include all events with latnecy in the range [400,700] |
'omitlatency' |
[latency_range] latency range of events to exclude |
'event' |
[event_range], indices of events to include |
'omitevent' |
[event_range], indices of events to exclude |
'USER_VAR' |
[VAR_range], 'USER_VAR' is any user-defined field in the event structure. Includes events with values of field 'USER_VAR' in the specified range. Use [vector] format for integers, 'min |
'omitUSER_VAR' |
[VAR_range], 'USER_VAR' range of events to exclude |
'select' |
['normal'|'inverse'] invert the selection of events. {Default is 'normal'} |
'deleteepochs' |
['on'|'off'] 'on' = Delete ALL epochs that do not include the specified events. {Default = 'on'}. This option is relevant only for epoched datasets derived from continuous datasets. |
'invertepochs' |
['on'|'off'] 'on' = Invert epoch selection. {Default = 'off'}. |
'deleteevents' |
['on'|'off'] 'on' = Delete ALL events except the selected events. {Default = 'off'}. |
'renametype' |
[string] rename the type of selected events with the string given as parameter. {Default is [], do not rename field}. |
'oldtypefield' |
[string] in conjunction with the previous parameter, create a new field (whose 'name' is provided as parameter) to store the (old) type of the event whose type has been renamed. {Default is [], do not create field}. |
| Outputs: | |
EEGOUT |
EEG dataset with the selected events only |
event_indices |
indexes of the selected events Ex: [EEGTARGETS,target_indices] = getevent(EEG,'type',[1 6 11 16 21]); % Returns ONLY THOSE epochs containing any of the 5 specified types of target events. |
| Note: | By default, if several optional inputs are given, the function performs their conjunction (&). |
| Author: | Arnaud Delorme, CNL / Salk Institute, 27 Jan 2002 |
| See also: | eeg_eventformat, pop_importevent |