[Eeglablist] Re-Reference

Arnaud Delorme arno at ucsd.edu
Wed Mar 16 22:18:22 PDT 2011


Dear Baris,

1 - indeed there was a problem showing the reference when multiple references were used. This has now been corrected.

2,3 - no ICA does not need the location of the electrodes and does not need to know the reference either. The location of the electrode is important for plotting ICA components as well as data channels. If you use Cz as a reference while recording and then you compute an average reference, you can recompute the potential at Cz under the average reference assumption (see EEGLAB tutorial for more details). So having the location of Cz (the reference) is important.

4 - the ICA computation is (or at least should be) independent of the reference selected. This means that ICA should find the unmixing matrix to separate artifact and brain sources irrespective of the reference you are choosing. However, the exact solution returned by ICA depends on the reference you are using. This is why it is important to re-rerefence the ICA unmixing matrix as well. In practice you should rereference your data before computing ICA. However, in some case, for some reason you might want to rereference after ICA and in this case, the unmixing matrix must be rereference as well.

Hope this makes sense,

Arno

On Mar 16, 2011, at 3:55 AM, Baris Demiral wrote:

> Dear Arno,
> 
> I understand the fact that eeglab pop_reref function is more elaborate than the other scripts (and I know that this script is only a bit of the iceberg that you work on in order to make the eeglab structure coherent). I have a number of points to make (please correct me where ever I am wrong):
> 
> 1- If we use other referencing scripts (pop_biosig etc), EEGLAB cannot detect the reference chosen (and cannot write it to the interface dialog box for instance.) Interestingly, if you use multiple references in the EEGLAB's pop_reref function, eeglab still cannot show them and leaves the reference information as "unknown". Only when you define a single electrode in pop_reref, it registers it into the eeg structure. But, this is not a big deal, we can live with that .
> 
> 2- I assume that you developed the pop_reref script for a scenario where researchers may also want to re-reference eeg data later in the process, maybe after ICA decompositions are computed. I generally finish re-referencing at the very beginning of the preprocessing steps so I do not need that (I have not needed this yet but I may in future). See the comment below:
> 
> 3- I acknowledge the fact that ICA needs the locations of all the electrodes to be fed for the ICA decomposition. Assume you used M1 and M2 for (re-)referencing (before the ICA computation without defining their location), and then take these electrodes (and other outer EOGs) out before the ICA computations, this would be fine, would not it? ICA does not need the reference electrode to be defined in this case. 
> 
> 4- I cannot understand why re-referencing would need to re-reference the ICA matrix. ICA components should be independent of the references selected (aren't they?) I am afraid this issue will take a very complicated phase in the discussion... 
> 
> Thanks,
> Baris
> 
> 
> 
> 
> On Tue, Mar 15, 2011 at 5:23 AM, Arnaud Delorme <arno at ucsd.edu> wrote:
> 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
> 
> 
> 
> -- 
> SB Demiral, PhD.
> Department of Psychology 
> 7 George Square
> The University of Edinburgh
> Edinburgh, EH8 9JZ
> UK
> Phone: +44 (0131) 6503063

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110316/21654e11/attachment.html>


More information about the eeglablist mailing list