[Eeglablist] Re-Reference
Arnaud Delorme
arno at ucsd.edu
Mon Mar 14 22:23:20 PDT 2011
Dear Baris,
I have just tested referencing using two electrodes in EEGLAB and it works like a charm both from the GUI and from the command line.
Your problem might be that M1 is the current reference and want to reference to M1 and M2 (linked mastoids).
You first need to declare M1 as the reference, then compute average reference and include (recompute) M1. Then you can reference using M1 and M2. It is a little convoluted in this specific case, I agree. The entire process is described in the tutorial (it is a recent addition).
http://sccn.ucsd.edu/wiki/Chapter_04:_Preprocessing_Tools#Re-referencing_the_data
Note that David's command does not reference the ICA matrix, does not allow to exclude channels, and does not update the channel location structure so it is better to use the official EEGLAB function. If you still have problems, please do not hesitate to submit a bug report (http://sccn.ucsd.edu/eeglab/bugzilla) detailing how to reproduce it.
Best regards,
Arno
ps: note that Tom's bug report was unrelated. We have fixed the issue.
On Mar 12, 2011, at 10:35 AM, Baris Demiral wrote:
> Since I use biosig to import bdf files, and biosemi bdf needs a reference while importing (to preserve some power), I am fine as soon as the biosig function works fine.
>
> What I can suggest to other people is the following:
>
> If you have already recorded your eeg with a reference electrode in the montage, and you just need to re-reference the data so that "the eeg data will have the reference to the average of the two electrodes", you can use David Groppe's script.
>
> In his function there is a line:
> data_avg=data_in2-repmat(data_in2(mastoid_id,:),size(data_in,1),1)/2;
> Since in the input file of this script, the first reference electrode would have a value of "0", the last piece of code at the end of data_avg above (divided by 2) will mean to take the half of the value of the new reference electrode row and subtract it from all other data matrix without explicitly defining the first reference (because its value would be 0 any ways). This will mean to "re-referencing the data to the mean/average of the two electrodes".
> If you had a grand average reference or similar montage in which you did not have an electrode with a value 0 during the recording, and you need to reference the data directly to one electrode: you can use the same script and just take out the "divided by 2" part. This will reference everything to the electrode you define. Is this right David?
> Baris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110314/9a3fb036/attachment.html>
More information about the eeglablist
mailing list