POP_SELECTEVENT | Find events in a 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 the events to include Ex: 'latency','400 < 700' Include all events with latnecy in the range [400,700] |
'omitlatency' |
[latency_range] latency range of the events to exclude |
'events' |
[events_range], indices of the events to include |
'omitevents' |
[events_range], indices of the 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 |
'deleteothers' |
['yes'|'no'] 'yes' = Delete ALL epochs that do not include the specified events. {NOTE Default = 'yes'}. This option is relevant only for epoched datasets derived from continuous datasets. |
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 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 |