<div dir="ltr"><div><div>In the development version there is a new method just for that <a href="http://mne-tools.github.io/dev/generated/mne.Evoked.html?highlight=apply_baseline#mne.Evoked.apply_baseline">http://mne-tools.github.io/dev/generated/mne.Evoked.html?highlight=apply_baseline#mne.Evoked.apply_baseline</a>.<br></div>You can also access the evoked data directly (evoked.data) and manipulate it to your liking,<br><br></div><div>-Jaakko<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 September 2016 at 16:45, Emanuela Liaci <span dir="ltr">&lt;<a href="mailto:emanuela.liaci@gmail.com" target="_blank">emanuela.liaci@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:13px">Hi </span><span style="font-size:13px">Jaakko, </span><div style="font-size:13px"><br></div><div style="font-size:13px">thanks for the enlightenment. Yes of course, now I understand the problem. But then since I have to apply the correction after the averaging, how can I do it?</div><span class=""><div style="font-size:13px"><br></div><div style="font-size:13px">Here my code:</div><div style="font-size:13px"><br></div><div style="font-size:13px"><div>epochs_noRef = mne.EpochsArray(ElectrodeArray<wbr>, info=info,tmin=-0.06)           # baseline = (-0.06, 0.04)</div><div>epochs_Ref,_= mne.io.set_eeg_reference(epoch<wbr>s_noRef, [&#39;TP9&#39;, &#39;TP10&#39;])</div><div>evoked=epochs_Ref.average()<br></div></div><div style="font-size:13px"><br></div><div style="font-size:13px">thanks a lot for your help,</div><div style="font-size:13px">Emanuela</div></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 5, 2016 at 4:44 PM, Emanuela Liaci <span dir="ltr">&lt;<a href="mailto:emanuela.liaci@gmail.com" target="_blank">emanuela.liaci@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi <span style="font-size:13px">Jaakko, </span><div><span style="font-size:13px"><br></span></div><div>thanks for the enlightenment. Yes of course, now I understand the problem. But then since I have to apply the correction after the emerging, how can I do it?</div><div><br></div><div>Here my code:</div><div><br></div><div><div>epochs_noRef = mne.EpochsArray(ElectrodeArray<wbr>, info=info,tmin=-0.06)           # baseline = (-0.06, 0.04)</div><div>epochs_Ref,_= mne.io.set_eeg_reference(epoch<wbr>s_noRef, [&#39;TP9&#39;, &#39;TP10&#39;])</div><div>evoked=epochs_Ref.average()<br></div></div><div><br></div><div>thanks a lot for your help,</div><div>Emanuela</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 5, 2016 at 4:14 PM, Jaakko Leppäkangas <span dir="ltr">&lt;<a href="mailto:jaeilepp@student.jyu.fi" target="_blank">jaeilepp@student.jyu.fi</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Emanuela,<br><br></div>I assume you do the baselining when constructing the epochs (mne.Epochs(..., baseline=baseline))? It simply subtracts the mean over the baseline period. So the effective lines of code boil down to:<br><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;dejavu sans mono&quot;;font-size:9pt">mean = np.mean(data[..., imin:imax], <span style="color:rgb(102,0,153)">axis</span>=-<span style="color:rgb(0,0,255)">1</span>)[..., <span style="color:rgb(0,0,128)">None</span>]<br>data -= <span style="background-color:rgb(228,228,255)">mean</span><br><br></pre>, where the baseline runs from imin to imax. And yes this should be documented better. I&#39;ll make the issue to github.<br><br></div>-Jaakko<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On 5 September 2016 at 14:48, Emanuela Liaci <span dir="ltr">&lt;<a href="mailto:emanuela.liaci@gmail.com" target="_blank">emanuela.liaci@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi,<div><br></div><div>I am comparing the evoke data of one subject between my script in Python with mne package and the script in IGOR pro that my lab used so far. </div><div><br></div><div>I gave the following time interval for baseline correction to both: baseline = (-0.060, 0.040). I noticed that the values of the average change: for each electrode there is always the same difference (between Python and IGOR) across data points. </div><div><br></div><div>How come? Can I have a more detailed explanation of how the baseline correction is applied?</div><div><br></div><div>Many thanks,</div><div>Emanuela Liaci</div><div><br></div><div><br></div><div><br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</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" rel="noreferrer" target="_blank">http://www.partners.org/compli<wbr>anceline</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>
<br>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</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" rel="noreferrer" target="_blank">http://www.partners.org/compli<wbr>anceline</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></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>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" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>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>