<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">Thanks so much for the feedback. Right now I'm trying to implement this
 in the raw stage, the rationale being that re-referencing might reduce the number of epochs that are rejected by amplitude threshold. I don't want to do this with an average reference, since I know that I have some noisy channels that I need to exclude.&nbsp;</span>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
I was playing around with this yesterday and I came up with a crude solution. I've attached my python code.</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
Although I eventually want to move to source modeling, right now I'm interested in using MNE to do ERP and spectral analysis, instead of using something Matlab based like EEGLAB. Would you recommend re-referencing in this context?</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
While I'm on the subject, EEGLAB recommends specifying a reference channel when import eeg data from a .bdf file. Their rationale ...</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<br>
</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<font face="courier new, monospace">% &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="white-space: pre-wrap; ">WARNING! Biosemi Active II data&nbsp;</span></font></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<span style="white-space: pre-wrap; font-family: 'courier new', monospace; ">% are recorded reference-free, but LOSE 40 dB of SNR&nbsp;</span></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<span style="white-space: pre-wrap; font-family: 'courier new', monospace; ">% if no reference is used!. If you do not know which</span></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<span style="white-space: pre-wrap; font-family: 'courier new', monospace; ">% channel to use, pick one and then re-reference after&nbsp;</span></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<span style="white-space: pre-wrap; font-family: 'courier new', monospace; ">% the channel locations are read in. {default: none}</span></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<span style="white-space: pre-wrap; font-family: 'courier new', monospace; "><br>
</span></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<span style="white-space: pre-wrap; "><font face="arial, helvetica, sans-serif">Is this also a problem with
</font></span><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space: pre-wrap; ">mne_edf2fiff ?
</span></font></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space: pre-wrap; "><br>
</span></font></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space: pre-wrap; ">Thanks again,</span></font></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space: pre-wrap; ">Alan Leggitt</span></font></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space: pre-wrap; "><br>
</span></font></div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">
<font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space: pre-wrap; "><br>
</span></font></div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF589778" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b> mne_analysis-bounces@nmr.mgh.harvard.edu [mne_analysis-bounces@nmr.mgh.harvard.edu] on behalf of Stephen Politzer-Ahles [politzerahless@gmail.com]<br>
<b>Sent:</b> Tuesday, October 01, 2013 3:49 AM<br>
<b>To:</b> Matti Hamalainen<br>
<b>Cc:</b> mne_analysis@nmr.mgh.harvard.edu<br>
<b>Subject:</b> Re: [Mne_analysis] Re-referencing EEG electrodes in MNE<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Thanks Matti and Alex for these suggestions, I just wanted to jump in with another question on the side if that is all right: Matti, is your comment about linked mastoids relevant specifically to physically linked mastoids, or also to arithmetically
 averaged mastoids (that are not physically linked)? I know the problems with physically linked mastoid channels, but is it also the case that separate mastoids shouldn't be used as a reference for source modeling?
<div><br>
</div>
<div>Thanks,</div>
<div>Steve</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div><br>
</div>
<div><br>
</div>
Stephen Politzer-Ahles<br>
New York University, Abu Dhabi<br>
Neuroscience of Language Lab<br>
<a href="http://www.nyu.edu/projects/politzer-ahles/" target="_blank">http://www.nyu.edu/projects/politzer-ahles/</a><br>
</div>
</div>
<br>
<br>
<div class="gmail_quote">On Tue, Oct 1, 2013 at 2:02 PM, Matti Hamalainen <span dir="ltr">
&lt;<a href="mailto:msh@nmr.mgh.harvard.edu" target="_blank">msh@nmr.mgh.harvard.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div style="word-wrap:break-word">
<div><br>
</div>
Hi Alan,
<div><br>
</div>
<div>The linked mastoids reference should not be used for source modeling. In my mind it is part of EEG heritage that should be definitely dropped.&nbsp;</div>
<div>In general re-referencing operations are not linear projection operations. Average reference is a special case.</div>
<div><br>
</div>
<div>You need to write some Python or Matlab code to modify your data if you want to view the EEG in the &quot;linked-ears&quot; format. Again this kind of data should not be used for source modeling purposes.</div>
<div><br>
</div>
<div>- Matti</div>
<div>
<div class="h5">
<div><br>
<div>
<div>On Oct 1, 2013, at 3:38 AM, Alexandre Gramfort &lt;<a href="mailto:alexandre.gramfort@telecom-paristech.fr" target="_blank">alexandre.gramfort@telecom-paristech.fr</a>&gt; wrote:</div>
<br>
<blockquote type="cite">Hi Alan,<br>
<br>
I am not aware of a way to do this in a generic manner with MNE/MNE-Python<br>
but it should not be hard.<br>
<br>
At what stage of the analysis would you apply the new reference? on<br>
Raw or Evoked?<br>
<br>
Maybe you can draft a python function to do this and we can see how to<br>
merge this to mne-python?<br>
<br>
best,<br>
Alex<br>
<br>
<br>
On Tue, Oct 1, 2013 at 12:43 AM, Alan &lt;<a href="mailto:alan.leggitt@ucsf.edu" target="_blank">alan.leggitt@ucsf.edu</a>&gt; wrote:<br>
<blockquote type="cite">Hello,<br>
<br>
I'm using MNE and MNE-Python to analyze EEG data from a 64 channel biosemi<br>
EEG cap, with no MEG channels, and 2 mastoid EEG channels for reference. I'd<br>
like to re-reference (offline) my EEG channels to the average of the 2<br>
mastoids. Is there a way to do this with either MNE command line or MNE<br>
python? I see that if I wanted to apply an average reference of all EEG<br>
channels, MNE command line stores this as a source space projection. What<br>
would this projection file look like if it were just the 2 mastoid<br>
electrodes?<br>
<br>
Thank you and I apologize if this has been addressed in a previous thread.<br>
<br>
Regards,<br>
Alan Leggitt<br>
<br>
_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the<br>
e-mail<br>
contains patient information, please contact the Partners Compliance<br>
HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in<br>
error<br>
but does not contain patient information, please contact the sender and<br>
properly<br>
dispose of the e-mail.<br>
<br>
</blockquote>
_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<br>
</div>
</div>
<div><span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:medium; white-space:normal; font-family:Helvetica; word-spacing:0px"><span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:medium; white-space:normal; font-family:Helvetica; word-spacing:0px">
<div style="word-wrap:break-word"><span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:12px; white-space:normal; font-family:Helvetica; word-spacing:0px">
<div style="word-wrap:break-word"><span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:12px; white-space:normal; font-family:Helvetica; word-spacing:0px">
<div style="word-wrap:break-word"><span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:12px; white-space:normal; font-family:Helvetica; word-spacing:0px">
<div style="word-wrap:break-word"><span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:12px; white-space:normal; font-family:Helvetica; word-spacing:0px">
<div style="word-wrap:break-word">
<div>---------</div>
<div><br>
</div>
<div>Matti Hamalainen, Ph.D.</div>
<div>
<div style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px">
<font face="Helvetica" size="3" style="font:normal normal normal 12px/normal Helvetica">Athinoula A. Martinos Center for Biomedical Imaging</font></div>
<div style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px">
<font face="Helvetica" size="3" style="font:normal normal normal 12px/normal Helvetica">Massachusetts General Hospital</font></div>
<div style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px">
<br>
</div>
</div>
<div><a href="mailto:msh@nmr.mgh.harvard.edu" target="_blank">msh@nmr.mgh.harvard.edu</a></div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span>
<div><a href="mailto:mhamalainen@partners.org" target="_blank">mhamalainen@partners.org</a></div>
<div><span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:medium; white-space:normal; font-family:Helvetica; word-spacing:0px"></span></div>
<span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:medium; white-space:normal; font-family:Helvetica; word-spacing:0px">
<div style="word-wrap:break-word"><span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:12px; white-space:normal; font-family:Helvetica; word-spacing:0px">
<div style="word-wrap:break-word"><span style="text-indent:0px; letter-spacing:normal; font-variant:normal; font-style:normal; font-weight:normal; line-height:normal; border-collapse:separate; text-transform:none; font-size:12px; white-space:normal; font-family:Helvetica; word-spacing:0px">
<div style="word-wrap:break-word"><br>
</div>
</span><br>
</div>
</span><br>
</div>
</span><br>
</span><br>
</div>
<br>
</div>
<br>
_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>