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. <div><br></div><div>What I can suggest to other people is the following: </div>
<div><br></div><div>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. </div>
<div><br></div><div>In his function there is a line:</div><div><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><pre style="word-wrap: break-word; white-space: pre-wrap; ">data_avg=data_in2-repmat(data_in2(mastoid_id,:),size(data_in,1),1)/2;</pre>
<pre style="word-wrap: break-word; white-space: pre-wrap; ">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". </pre>
<pre style="word-wrap: break-word; white-space: pre-wrap; ">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? </pre>
</span>Baris</div><div><br><div class="gmail_quote">On Sat, Mar 12, 2011 at 3:22 AM, Tom Campbell <span dir="ltr"><<a href="mailto:tom_campbell75@hotmail.com">tom_campbell75@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<br>Hi, Here's a bug report.<br>
<div> </div>
<p><br><a href="https://sccn.ucsd.edu/eeglab/bugzilla/show_bug.cgi?id=1001" target="_blank">https://sccn.ucsd.edu/eeglab/bugzilla/show_bug.cgi?id=1001</a><br><br>
I'd be interest what you make of it.<br>
<br>
Best regards,<br>
<br>
Tom.<br><br> <br>
<br>
> From: <a href="mailto:oricon@umich.edu" target="_blank">oricon@umich.edu</a><br>> Date: Wed, 9 Mar 2011 12:07:17 -0500<br>> To: <a href="mailto:demiral.007@googlemail.com" target="_blank">demiral.007@googlemail.com</a><br>
> CC: <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>> Subject: Re: [Eeglablist] Re-Reference</p><div><div></div><div class="h5"><br>> <br>> Hi Baris, I wasn't aware there was a bug in pop_reref (do you have the<br>
> post about this? - I searched through the last several years and<br>> didn't see anything). I don't actually use pop-reref for my data, I<br>> use Biosemi, so I set the average mastoid reference when I read in my<br>
> data with pop_biosig. I have used pop_reref to then go to an average<br>> reference, and I've never experienced any problems with the<br>> re-referencing.<br>> <br>> -Joe<br>> <br>> On Wed, Mar 9, 2011 at 3:25 AM, Baris Demiral<br>
> <<a href="mailto:demiral.007@googlemail.com" target="_blank">demiral.007@googlemail.com</a>> wrote:<br>> > A while ago there was a bug related to the pop_re-reference in EEGLAB and it<br>> > was not working at all. I wonder this is fixed now. I have been importing my<br>
> > files with M1 reference (in my montage 65), and then use David G's script<br>> > to re-reference it to the mean of the M1 and M2 (66).<br>> > Joseph, are you sure EEG = pop_reref( EEG, [65 66] is working properly. If<br>
> > so which version of eeglab are you using?<br>> > best,<br>> > Baris<br>> > On Tue, Mar 8, 2011 at 5:39 PM, Joseph Orr <<a href="mailto:oricon@umich.edu" target="_blank">oricon@umich.edu</a>> wrote:<br>
> >><br>> >> If you're using the pop_reref GUI then just put the two channel<br>> >> numbers in the "re-rereference data to channel(s):" box separated by a<br>> >> space (e.g. 65 66).<br>
> >><br>> >> If you're using the command-line: EEG = pop_reref( EEG, [65 66] ).<br>> >><br>> >> --<br>> >> Joseph Orr<br>> >> PhD Candidate<br>> >> University of Michigan<br>
> >> Department of Psychology<br>> >> Cognition & Cognitive Neuroscience Area<br>> >> 4422 East Hall<br>> >> 530 Church Street<br>> >> Ann Arbor, MI 48109-1043<br>> >> Email: <a href="mailto:oricon@umich.edu" target="_blank">oricon@umich.edu</a><br>
> >> <a href="http://sitemaker.umich.edu/josephorr/home" target="_blank">http://sitemaker.umich.edu/josephorr/home</a><br>> >><br>> >> On Mon, Mar 7, 2011 at 6:58 AM, <<a href="mailto:aarjona@us.es" target="_blank">aarjona@us.es</a>> wrote:<br>
> >> > Hello.<br>> >> ><br>> >> > I´m trying to reference to M1 and M2, but in the pop of eeglab only can<br>> >> > appear one of them (reference M1).<br>> >> ><br>
> >> > How can I reference to both channels?<br>> >> ><br>> >> > Thanks so much<br>> >> ><br>> >> > _______________________________________________<br>> >> > Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
> >> > To unsubscribe, send an empty email to<br>> >> > <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>> >> > For digest mode, send an email with the subject "set digest mime" to<br>
> >> > <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br>> >> ><br>> >><br>> >> _______________________________________________<br>
> >> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>> >> To unsubscribe, send an empty email to<br>> >> <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
> >> For digest mode, send an email with the subject "set digest mime" to<br>> >> <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br>> ><br>
> ><br>> ><br>> > --<br>> > SB Demiral, PhD.<br>> > Department of Psychology<br>> > 7 George Square<br>> > The University of Edinburgh<br>> > Edinburgh, EH8 9JZ<br>> > UK<br>
> > Phone: <a href="tel:%2B44%20%280131%29%206503063" target="_blank">+44 (0131) 6503063</a><br>> ><br>> <br>> <br>> <br>> -- <br>> Joseph Orr<br>> PhD Candidate<br>> University of Michigan<br>
> Department of Psychology<br>> Cognition & Cognitive Neuroscience Area<br>> 4422 East Hall<br>> 530 Church Street<br>> Ann Arbor, MI 48109-1043<br>> Email: <a href="mailto:oricon@umich.edu" target="_blank">oricon@umich.edu</a><br>
> <a href="http://sitemaker.umich.edu/josephorr/home" target="_blank">http://sitemaker.umich.edu/josephorr/home</a><br>> <br>> _______________________________________________<br>> Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
> To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>> For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br>
> <br> </div></div><p></p></div>
</blockquote></div><br><br clear="all"><br>-- <br>SB Demiral, PhD.<br>Department of Psychology <br>7 George Square<br>The University of Edinburgh<br>Edinburgh, EH8 9JZ<br>UK<br>Phone: +44 (0131) 6503063<br>
</div>