[Eeglablist] re-reference with EGI data

Arnaud Delorme arno at ucsd.edu
Thu Sep 6 12:25:03 PDT 2012


Hi James and Tarik,

yes, please do submit a bug report. Are you using the latest version of EEGLAB?
Thanks,

Arno

ps: I would not expect the fix below to work.

On Sep 4, 2012, at 12:22 PM, James Desjardins wrote:

> Hi Josh,
> 
> I recently came across this issue as well. I think that it is a bug in the pop_reref function. The old-reference selection button is looking for the nodatchans.labels field in the tmpchaninfo structure but it is not there.
> 
> One work around is to tell it to look in the EEG structure instead of the tmpchaninfo structure as follows...
> 
> Change line 103 in pop_reref.m from:
> 
> '   tmpchaninfo = EEG(1).chaninfo; [tmp tmpval] = pop_chansel({tmpchaninfo.nodatchans.labels}, ''withindex'', ''on''); set(findobj(gcbf, ''tag'', ''refloc''  ), ''string'',tmpval); clear tmpchanlocs tmp tmpval;' ...
> 
> to:
> 
> '   tmpchaninfo = EEG(1).chaninfo; [tmp tmpval] = pop_chansel({EEG.nodatchans.labels}, ''withindex'', ''on''); set(findobj(gcbf, ''tag'', ''refloc''  ), ''string'',tmpval); clear tmpchanlocs tmp tmpval;' ...
> 
> 
> 
> I will submit a bug report.
> 
> 
> 
> James Desjardins, MA
> Electrophysiology Technologist
> Cognitive and Affective Neuroscience Lab, Psychology Department 
> Jack and Nora Walker Centre for Lifespan Development Research
> Brock University
> 500 Glenridge Ave.
> St. Catharines, ON, Canada L2S 3A1
> 905-688-5550 x4676
> --
> "'Cause you never can tell What goes on down below!
> "This pool might be bigger Than you or I know!"
> 
> McElligot's Pool
> Dr.Seuss 1947
> From: eeglablist-bounces at sccn.ucsd.edu [eeglablist-bounces at sccn.ucsd.edu] on behalf of Joshua Hartshorne [jkhartshorne at gmail.com]
> Sent: August-30-12 6:24 PM
> To: eeglablist at sccn.ucsd.edu
> Subject: [Eeglablist] re-reference with EGI data
> 
> Hi Tarik,
> 
> This is very helpful. I'm still having difficulty getting the reference channel (Cz) added back into my data. In the pop-up window, it doesn't seem possible (when I click on ... in order to chose the reference channel in order to add it back into the data, I get the following error:
> 
> Undefined variable "tmpchaninfo" or class "tmpchaninfo.nodatchans.labels".
>  
> Error using waitfor
> Error while evaluating uicontrol Callback
> 
> Because of this, I'm not able to use EEG.history to figure out the right syntax for my scripts (interestingly, what I do get when I run without adding Cz back has a lot of inputs that aren't described in the pop_reref help file). I've been playing around with reref (not the pop_ version) to see if I can figure this out, but so far, no luck.
> 
> Thanks,
> Josh
> 
> On Thu, Aug 30, 2012 at 3:16 PM, <eeglablist-request at sccn.ucsd.edu> wrote:
> ---------- Forwarded message ----------
> From: Tarik S Bel-Bahar <tarikbelbahar at gmail.com>
> To: jkhartshorne at gmail.com
> Cc: eeglablist at sccn.ucsd.edu
> Date: Wed, 29 Aug 2012 18:02:45 -0700
> Subject: Re: [Eeglablist] re-reference with EGI data
> I've tended to import continuous files EGI RAW files into EEGLAB and to go from there. There may be few or no time points or epochs in one of the raw files. The message looks like it's just saying that it found no epochs and changed it to 1 big epoch for eeglab. Happy brain maps, stay in touch regarding your adventure.  
> 
> 
> 
> 
> On Wed, Aug 29, 2012 at 12:39 PM, Joshua Hartshorne <jkhartshorne at gmail.com> wrote:
> Thanks, Stephen, Tarik, Simon,
> 
> I am using the older GSN (pre-HydroCel) caps. EEGLab seems to correctly decide which locations file to use, and that file matches the one on EGI's website.
> 
> I did notice, however, an odd warning when importing, which makes me worried and makes me wonder if any of you know something about it. Invariably, I get this message:
> 
> eeg_checkset warning: 3rd dimension size of data (1) does not match the number of epochs (0), corrected
> eeg_checkset warning: number of columns in data (501045) does not match the number of points (0): corrected
> 
> Here is all the output, just so you can see that warning in context:
> 
> Removing trailing character of selected file to find base file name
> Base file name is: /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20001.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20002.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20003.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20004.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20005.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20006.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20007.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20008.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20009.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20010.raw
> Importing binary EGI data file ...
> Importing /Users/jkh80/Documents/EEG_Data/ScalarImplicature/SI_Filtered_Raw/SI20011.raw
> pop_chanevent: importing events from data channel 166 ...
> eeg_checkset warning: 3rd dimension size of data (1) does not match the number of epochs (0), corrected
> eeg_checkset warning: number of columns in data (991630) does not match the number of points (0): corrected
> eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1 = number of frames
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 165 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 164 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 163 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 162 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 161 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 160 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 159 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 158 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 157 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 156 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 155 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 154 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 153 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 152 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 151 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 150 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 149 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 148 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 147 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 146 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 145 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 144 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 143 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 142 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 141 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 140 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 139 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 138 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 137 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 136 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 135 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 134 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 133 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 132 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 131 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> pop_chanevent: importing events from data channel 130 ...
> eeg_checkset note: creating the original event table (EEG.urevent)
> Removing 1 channel(s)...
> Deleting empty data reference channel (reference channel location is retained)
> EGI channel location automatically detected GSN129.sfp ********* WARNING please check that this the proper file
> 
> 
> The data end up looking reasonable, so I'm not too worried about this, but I'd like to make sure it's not something I should worry about.
> Thanks,
> Josh
> 
> 
> On Wed, Aug 29, 2012 at 2:49 PM, Simon-Shlomo Poil <poil.simonshlomo at gmail.com> wrote:
> Dear Joshua,
> 
> This is known issue with the EGI electrode files. You simply need to delete the additional channels.
> 
> Try to use one of the two channel location files I have attached. However, first carefully check that the layout is the same as your cap (EGI has different layouts!).
> 
> Hope it works,
> Simon
> 
> -- 
> Simon-Shlomo Poil
> http://www.nbtwiki.net 
> 
> 2012/8/24 Joshua Hartshorne <jkhartshorne at gmail.com>
> I have EGI data recorded with a 128 electrode cap (vertex reference). I exported it to EEGLab and included the reference in the export (I used the multiple file format).
> 
> EEGLab seems to recognize everything fine and includes 128 electrodes in the data, though when I go to "edit channel locations", I see 132 channels. The last one is my reference channel, labeled correctly as Cz. Though it's channel type is listed as "REF", no Reference is listed in the pop-up window (the section below the panel of "channel type") for any channel. I have no idea what channels 129-131 are (they are labeled FidNz, FidT9, and FidT10).
> 
> So I want to re-reference. If I check "compute average reference", I don't have the option of retaining the old reference channel, which seems odd. If I click on the "..." button after "Add current reference channel back to the data", I get an error (??? Error using ==> waitfor Error while evaluating uicontrol Callback). From the wiki, I understand I should have gotten a list. Manually setting reference to "Cz" or "132" using the "edit channel info" window for channels 1:128 doesn't fix this problem.
> 
> However, if I leave all that blank, I "successfully" re-reference to average reference. That is, I don't get an error, though I'm not sure how to determine whether it worked correctly or not. 
> 
> What I'd really like to do is re-reference to the average of the mastoids (channels 57 and 101), which would aid comparison with another dataset that was collected on different equipment with fewer electrodes. But the wiki suggests that I have to do this by going through average reference first (really?), so I wanted to make sure I had that much right first. 
> 
> In any case, I assume that if I list two electrodes in the "re-reference data to channel(s):" box that it will automatically compute the average of those two. I tried doing that (both with and without going through average reference), and I notice that channels 57 and 101 are *not* listed as "REF" in "Channel type" after doing this, while Cz is still listed as "REF", though "Reference" is now listed as "E57 E101". 
> 
> I appreciate any help.
> Josh Hartshorne
> 
> _______________________________________________
> 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 mailing list eeglablist at sccn.ucsd.edu
> Eeglablist page: http://www.sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsub at sccn.ucsd.edu
> To switch to non-digest mode, send an empty email to eeglablist-nodigest 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/20120906/5eceaf10/attachment.html>


More information about the eeglablist mailing list