POP_REREF Convert an EEG dataset to average reference or to a new common reference channel (or channels). Calls reref().


Usage: >> EEGOUT = pop_reref( EEG ); % pop up interactive window
>> EEGOUT = pop_reref( EEG, ref, 'key', 'val' ...);

Graphic interface:
"Compute average reference"   
[edit box] Checking this box (for 'yes') is the same as giving an empty value for the commandline 'ref' argument. Unchecked, the data are transformed to common reference.
"Re-reference data to channel number(s)"   
[checkbox] Checking this option automatically unchecks the checkbox above, allowing reference channel indices to be entered in the text edit box to its right (No commandline equivalent).
"Re-reference data to channel number(s)"   
[edit box] Enter the index of the electrode(s) for re-referencing here. Commandline equivalent: 'ref'.
"Include old reference channel"   
[checkbox] When re-referencing the data, checking this checkbox reconstitutes the data for the previous reference channel. If the location for this channel was not defined, it can be specified using the text box below. Commandline equivalent: 'method', 'withref'
"Include old reference channel"   
[edit boxes] Use these edit boxes to specify the previous reference channel location. Same as the 'refloc' commandline option. Note: When the chanloc structure contains one more channel than the data do, its last channel is taken to be the (previous) reference, and its location does not have to be specified again here.

Inputs:
EEG   
input dataset
ref   
reference: [] = convert to average reference [int vector] = new reference electrode number(s)

Optional inputs:
'method'   
['standard'|'withref'] can either be 'withref' = recompute the previous reference channel data, or 'standard' = do not recompute the previous reference channel. See >> help reref()
'refloc'   
[cell array] Previous common-reference channel label and polar coordinates location. Ex: { 'Cz' 0 0 }. This information may also be passed as the last channel in the 'EEG.chanlocs' data struture).

Outputs:
EEGOUT   
re-referenced output dataset

Notes: For other options, call reref() directly. See >> help reref

Author: Arnaud Delorme, CNL / Salk Institute, 12 Nov 2002

See also: reref(), eeglab()

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

Back to functions