re-reference to linked mastoid
kylemath opened this issue · comments
Kyle Mathewson commented
Kyle Mathewson commented
since it is all linear, lets not, and say we did (more important for ERP comparisons across studies )
Kyle Mathewson commented
% arithmetically rereference to linked mastoid
for x=1:EEG.nbchan-2
EEG.data(x,:) = (EEG.data(x,:)-((EEG.data(EEG.nbchan-2,:))*.5));
end
Kyle Mathewson commented
fixed in #8
with new function in util.py, and call in preprocessing, and flag in preprocessing
def mastoidReref(raw):
ref_idx = pick_channels(raw.info['ch_names'],['M2'])
eeg_idx = pick_types(raw.info,eeg=True)
raw._data[eeg_idx,:] = raw._data[eeg_idx,:] - raw._data[ref_idx,:] * .5 ;
return raw