POP_REJTREND Measure linear trends in EEG data; reject data epochs containing strong trends.


Usage: >> pop_rejtrend( INEEG, typerej); % pop up an interactive window
>> OUTEEG = pop_rejtrend( INEEG, typerej, elec_comp, winsize, maxslope, minR, superpose, reject);

Pop-up window interface:
"Electrode|Component number(s)"   
[edit box] electrode or component number(s) to take into consideration during rejection. Sets the 'elec_comp' parameter in the command line call (see below).
"Slope window width"   
[edit box] integer number of consecutive data points to use in detecting linear trends. Sets the 'winsize' parameter in the command line call.
"Maximum slope to allow"   
[edit box] maximal absolute slope of the linear trend to allow in the data. If electrode data, uV/epoch; if component data, std. dev./epoch. Sets the 'maxslope' parameter in the command line call. "R-square limit" -[edit box] maximal regression R-square (0 to 1) value to allow. Sets the 'minR' parameter in the command line call.
"Display previous rejection marks?"   
[edit box] either YES or NO. Sets the command line input option 'superpose'.
"Reject marked trials?"   
[edit box] either YES or NO. Sets the command line input option 'reject'.

Command line inputs:
INEEG   
input EEG dataset
typerej   
[1|0] data to reject on: 0 = component activations;
1   
electrode data. {Default: 1}.
elec_comp   
[e1 e2 ...] electrode|component number(s) to take into consideration during rejection
winsize   
(integer) number of consecutive points to use in detecing linear trends
maxslope   
maximal absolute slope of the linear trend to allow in the data
minR   
minimal linear regression R-square value to allow in the data (= coefficient of determination, between 0 and 1)
superpose   
[0|1] 0 = Do not superpose marks on previous marks stored in the dataset; 1 = Show both types of marks using different colors. {Default: 0}
reject   
[1|0] 0 = Do not reject marked trials but store the labels; 1 = Reject marked trials. {Default: 1}

Outputs:
OUTEEG   
output dataset with rejected trials marked for rejection

Note: When eegplot() is called, modifications are applied to the current
dataset at the end of the call to eegplot() (e.g., when the user presses
the 'Reject' button).

Author: Arnaud Delorme, CNL / Salk Institute, 2001

See also: rejtrend(), eeglab(), eegplot(), pop_rejepoch

See the matlab file pop_rejtrend.m (may require other functions)

Back to functions