[Eeglablist] online reference

Roy Cox r.cox at uva.nl
Thu May 7 11:30:09 PDT 2015


hi all,

saw this discussion and I'm trying to do something similar from the command
line, but no luck.

I import 63 channel data that I know to be referenced to the forehead. then
I remove 3 EOG and EMG channels (60 remaining).

I've created a 61 channel electrode location file, that I read in and
separate into the first 60 "active" locations and the 61st ref/forehead
location. I assign the 60 channel locations to my EEG, and then want to
rereference to average mastoids, while keeping both mastoid channels and
reconstructing the forehead channel. I've tried a couple of things, calling
both pop_reref and reref. I'm sure there's a simple solution but can't get
it to work. the code to my latest attempt:

%read in electrode locations

allchanlocs=readlocs(electrodeFile,'filetype','custom','format',{'labels'
'X' 'Y' 'Z'});



%split into active and ref locs

chanlocs_active=allchanlocs(1:60);

chanlocs_ref=allchanlocs(61);



%read in 63 channel EDF and remove eyes and emg

EEG=pop_biosig(fullfile(subjectFolder,dataFile),'importevent','off');

EEG=pop_select(EEG,'nochannel',[1 2 63]);

EEG.chanlocs=chanlocs_active;

EEG=eeg_checkset(EEG)  ##STILL OK



%rereference to average mastoids

EEG=pop_reref(EEG,[59 60],'keepref','on','refloc',chanlocs_ref);



this now crashes like this:


Attempt to reference field of non-structure array.


Error in pop_reref (line 215)

         allinds = [allinds strmatch( g.refloc(iElec).labels, {
tmpchaninfo.nodatchans.labels }) ];

On Tue, Apr 28, 2015 at 5:36 AM, Dezhong Yao <dyao at uestc.edu.cn> wrote:

>  Hi, all reference-issue followers;
>   Physically,  "add current reference channel back to data" actually adds
> a channel with zero potential to current configuration,
> then you may re-reference to any other configuration, such average, linked
> ears reference.
> The best re-reference is  the  "zero reference" realized  by "REST"
> (reference electrode standardization technique) at
> www.neuro.uestc.edu.cn/rest , where free-software is available,
> and it may interpolate bad channel the same time.
>     Best wishes
> ------------------
> Dezhong Yao  PhD
> Cheung Kong Professor of Neuroengineering, Neuroimaging
> E-mail: dyao at uestc.edu.cn
> Fax: 86-28-83208238; Tel: 86-28-83201018
> Director, Key Laboratory for NeuroInformation,  Ministry of Education,
> China
>               International Joint Research Center for NeuroInformation,
> Ministry of Science and Technology, China
> Dean,      School of Life Science and Technology, University of Electronic
> Science and Technology of China, Sichuan,Chengdu 610054, China
> Director,  Center for Information in BioMedicine, University of Electronic
> Science and Technology of China, China
> http://www.neuro.uestc.edu.cn/bci/member/yao/yao.html
> 2015-04-28
> -------------------------------------------------------------
> 发件人:Brittany Alperin
> 发送日期:2015-04-28 14:04:07
> 收件人:Andreas Widmann
> 抄送:EEGLAB List
> 主题:Re: [Eeglablist] online reference
>
> Hi Andreas
>
> You're right. I forgot that compute average reference is automatically
> checked, so I was looking at the data with the average reference instead of
> a Cz reference.
>
> I think I have this all cleared up now. Thanks for the help!
>
> Brittany
>
> On Sat, Apr 25, 2015 at 9:17 AM, Andreas Widmann <widmann at uni-leipzig.de>
> wrote:
>
> > > To clarify, I have 31 channels + ref (Cz) + ground. So 33 in total.
> > Good!
> >
> > > I added Cz to my channel locations and selected "add current reference
> > channel back to data" without re-referencing to anything else.
> > Sorry, could you please clarify how you use the "add current reference
> > channel back to data“-option *without* actually re-referencing? To my
> > understanding this should be impossible. Either the „Compute average
> > reference“ or the „Re-reference data to channel(s)“-option is always
> > selected in the pop_reref GUI. In case „Compute average reference“ was
> > selected, the data were re-referenced to the mean of all channels.
> >
> > > I can now see Cz, but it isn't a flat line. Am I incorrect in thinking
> > that it should be totally flat?
> > Without re-referencing the implicit reference should indeed be a flat
> > line/zero.
> >
> > Hope this helps!
> > Andreas
> >
> > > Thanks,
> > > Brittany
> > >
> > > On Thu, Apr 23, 2015 at 5:29 AM, Andreas Widmann <
> widmann at uni-leipzig.de>
> > wrote:
> > > Hi Brittany,
> > >
> > > this sounds like two different problems:
> > > If you record from 32 channels + Ref + Ground the imported file should
> > have 32 channels (but not your Cz Ref channel). Please reconfirm that
> your
> > Pycorder setup really records from 32 data channels (34 electrodes). In
> > case there is really a channel missing, please, submit a bug report to
> the
> > bugtracker including a short sample file.
> > >
> > > If you want to keep the implicit online reference (Cz) as a new channel
> > after re-referencing the data to another channel you have to use the „Add
> > current reference channel back to the data“-option (GUI; 'refloc‘ on
> > command line). To use this option you have to first append a (Cz-)
> channel
> > in the GUI channel editor (appearing in EEG.chaninfo.nodatchans) which
> you
> > can subsequently select during re-referencing. The „new“ Cz-channel is
> the
> > inverse of the channel the data were re-referenced to (now missing in the
> > data or being flat if "Retain old reference channels in data“ was
> selected).
> > >
> > > Please note that the „Add current reference channel back to the
> > data“-option should not be used for systems where common mode rejection
> is
> > applied offline (e.g. Biosemi).
> > >
> > > Hope this helps,
> > > Andreas
> > >
> > > > Am 22.04.2015 um 21:59 schrieb Brittany Alperin <
> balperin07 at gmail.com
> > >:
> > > >
> > > > Hello
> > > >
> > > > I'm using a 32 channel brain vision system and am recording with
> > PyCorder. When I import my data using the brain vision recorder plugin,
> > only 31 channels are present. I'm recording with Cz as an online
> reference
> > and Cz is the channel that is missing. I can re-reference, but Cz is
> still
> > absent.
> > > >
> > > > Has anyone had an issue with recording with an online reference and
> > not having that data import into EEGlab? Or does anyone have a different
> > way to import brain vision data?
> > > >
> > > > Thanks,
> > > > Brittany
> > > >
> > > >
> > > > _______________________________________________
> > > > 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
> > >
> > >
> >
> >
>
> _______________________________________________
> 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
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20150507/1f1124da/attachment.html>


More information about the eeglablist mailing list