[Eeglablist] Average Reference after measuring 128 Ch using one of the 128 channels as reference (Cz)?

Ernesto Gonzalez Trejo gonzalez at snn-unit.de
Fri Dec 4 01:33:03 PST 2015


Dear Makoto,

thanks again for your answer. Still: 

> If you have reference channel in your data, the recorded signal is (ref chan)
> - (ref chan) = 0, so it should be flat. You want to remove this flat channel,
> of course.

As i mentioned on the previous emails, the reference channel in the recorded
signal is NOT zero, due to the manufacturer (g.tec) settings (since there are no
dedicated reference electrodes, the channel chosen as a reference will be
measured against Ground and not against itself, in order not to lose the
channel).  That's why i was not sure if this channel should be used within the
averaging or if EEGLAB ignores it for the calculation of AR. 

It seems then, that EEGLAB ignores the reference channel (since theoretically
should be 0) so from now on i will remove it pre-AR, and afterwards i will write
the inverted mean of all electrodes into the reference channel (as it should be
(ref chan-ref chan)-(average of all channels)). 

Thanks,

Ernesto




> On December 2, 2015 at 7:19 PM Makoto Miyakoshi <mmiyakoshi at ucsd.edu> wrote:
> 
> Dear Ernesto,
> 
> > Should I remove the reference channel from my data (select>
> If you have reference channel in your data, the recorded signal is (ref chan)
> - (ref chan) = 0, so it should be flat. You want to remove this flat channel,
> of course.
> 
> After average referencing, you may want to discard *any* one channel to make
> the data full-ranked.
> 
> Makoto
> 
> On Wed, Dec 2, 2015 at 3:11 AM, Ernesto Gonzalez Trejo <gonzalez at snn-unit.de>
> wrote:
> 
> > Dear Makoto,
> > 
> >  thank you for your answer.
> > 
> >  There is no problem when importing the data and setting Cz (ch 30) as
> > reference
> >  when i set the channel locations. But i don't know if it is valid for
> > EEGLAB if
> >  i assign one of my existing 128 channels as reference (by edit->channel
> >  locations->set reference-> Channel Indices 1:128, Reference Cz).  There is
> > no
> >  exclusive reference channel appended at the end. Is this refrence
> > assignment
> >  only a label? does it matter when computing the average reference?
> > 
> >  I can "synthesize" my question as follows: Should I remove the reference
> > channel
> >  from my data (select>
> > 
> > > On December 1, 2015 at 9:17 PM Makoto Miyakoshi <mmiyakoshi at ucsd.edu>
> > > wrote:
> > >
> > > Dear Ernesto,
> > > > i have a brief question
> > >
> > > I thought it was quite long, which is why I did not understand the
> > > question.Let me start from here: What's the problem of importing the data
> > > and
> > > apply average reference?
> > > REST is a good solution but I've never been used it myself. Does REST has
> > > Matlab code? If it's available I'd love to try it out.
> > > Another approach is Nima Bigdely-Shamlo's PREP. It'll do conscientious
> > > channel
> > > cleaning before average
> > > referencing.http://journal.frontiersin.org/article/10.3389/fninf.2015.00016/abstract
> > 
> > > Makoto
> > > On Thu, Nov 26, 2015 at 7:14 AM, Ernesto Gonzalez Trejo
> > > <gonzalez at snn-unit.de>
> > > wrote:
> > > > Hi everyone,
> > > >
> > > > i have a brief question regarding a correct average referencing in
> > > > EEGLAB,
> > > > that until now i've been unable to solve. I've read the EEGLAB tutorial
> > > > and
> > > > also searched for some answers in the EEGLAB list but until now i didn't
> > > > find one that helps me solve the problem.
> > > >
> > > > I am doing EEG measurements with 128 Channels, using the channel in the
> > > > position Cz as reference(ch. 30 in my cap). During the acquisition, the
> > > > amplifier properties have Cz set as reference for all electrodes, and 
> > > > the
> > > > Cz electrode is then measured then against the ground. Additionally, two
> > > > more channels (63-64) are on the earlobes and are usually discarded
> > > > since
> > > > i'm not using them as reference or for data analysis.
> > > >
> > > > Given the nature of the measurement I consider the average reference the
> > > > way
> > > > to go in order to represent better the brain activity.
> > > >
> > > > The acquisition is done through SIMULINK and saved into a MAT file, for
> > > > post-processing in MATLAB. (The output is a 128xL matrix, where L is the
> > > > length of the measurement in samples).
> > > >
> > > > The problem i have is that i can't seem to indicate correctly to EEGLAB
> > > > that
> > > > the reference used in my measurement is also part of the channels. When
> > > > i
> > > > import the mat file, i cannot give explicitely the channel (as stated on
> > > > the
> > > > import window's help:
> > > >
> > > > "Ref. channel indices or mode" - [edit box] current reference. This edit
> > > > box
> > > >  cannot be edited. To change data reference, use menu
> > > >  Tools > Re-reference calling function pop_reref(). The reference
> > > >  can be a string, 'common' indicating an unknow common reference,
> > > >  'averef' indicating average reference, or an array of integer
> > > >  containing the indices of the reference channels."
> > > >
> > > > Then, after I import the data without a reference, I select the channel
> > > > locations (using a self-made loc file for the cap i use). Here, each one
> > > > of
> > > > the 128 channels has a label (10-10 system names for electrodes 1-64 and
> > > > just the electrode number for 65-128). Once loaded, i click on "Set
> > > > Reference" and write 1:128 as channel indices and Cz as "Reference".
> > > > (Channel 30 has the label Cz and was the reference in the measurement).
> > > > After the locations are set, i remove channels 63 and 64, since i don't
> > > > want
> > > > to use them for AR.
> > > >
> > > > So far, so good. After this i can just go and compute the average
> > > > reference
> > > > using the tools from EEGLAB. I wanted to validate the results so i kept
> > > > doing some tests, and i realized that if i clicked on tools-rereference
> > > > and
> > > > then to "add current reference channel back to the data", the error :
> > > >
> > > > "There are no Reference channel defined, add it using the channel
> > > > location
> > > > editor"
> > > >
> > > > appeared, although in the main EEGLAB window the Reference is stated to
> > > > be
> > > > Cz and Channel locations as "Yes".
> > > >
> > > > Question 1:
> > > >
> > > > Could it be that i am giving the Reference wrong in the channel
> > > > locations?
> > > > After reading the tutorials i only got that the reference is usually
> > > > given
> > > > as an extra channel, which is appended to the locations. In this case,
> > > > it is
> > > > not an extra channel, but channel 30 of 128. Is it wrong then, to input
> > > > this
> > > > channel as i did in the channel locations?
> > > >
> > > > Question 2:
> > > >
> > > > Since i wanted to see how exactly the average referencing was working, I
> > > > checked also the reref.m function from EEGLAB and tried to run it
> > > > standalone
> > > > as follows:
> > > >
> > > > output=reref(eeg,30,'exclude',[63 64],'keepref','on');,
> > > >
> > > > where i am only interesed on the average-referenced EEG (output) and i
> > > > give
> > > > a 128xL matrix (my EEG measurement), I indicate my reference was the
> > > > channel
> > > > (row) 30, and i exclude the earlobes (63 64).
> > > >
> > > > The output is however very different to the one i obtain with the method
> > > > explained above in EEGLAB.
> > > >
> > > > In order to obtain the (mostly) same result as in EEGLAB i have to input
> > > > the
> > > > following:
> > > >
> > > > output=reref(eeg,30,'exclude',[30 63 64],'keepref','on');
> > > >
> > > > So, what exactly am i doing wrong here? I am probably specifying the
> > > > reference in a wrong way. How should one manage such a reference system
> > > > within EEGLAB or in the reref function? As i understand the calculation
> > > > of
> > > > average referencing, i should NOT use the values of the reference to
> > > > calculate the mean of all electrodes, which would be afterwards
> > > > subtracted
> > > > from each one. And if i wanted to see the signal of Cz post-AR, i would
> > > > have
> > > > it by inverting the mean of all electrodes. If so, then the right way to
> > > > go
> > > > here would be to exclude also the channel 30 in the reref function. Is
> > > > that
> > > > right?
> > > >
> > > > I am using currently EEGLAB v13.4.4b on MATLAB R2013a
> > > >
> > > > Thanks in advance!
> > > >
> > > > EG
> > > >
> > > > _______________________________________________
> > > >  Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> > > >  To unsubscribe, send an empty email to
> > > >eeglablist-unsubscribe at sccn.ucsd.edu
> > > >  For digest mode, send an email with the subject "set digest mime" to
> > > > eeglablist-request at sccn.ucsd.edu
> > >
> > > --
> > > Makoto Miyakoshi
> > > Swartz Center for Computational Neuroscience
> > > Institute for Neural Computation, University of California San Diego
> 
> -- 
> 
> Makoto Miyakoshi
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, University of California San Diego



More information about the eeglablist mailing list