<div dir="ltr"><div>Yes, the difference I found was between time-frequency plot and values in matrices obtained from <span style="font-size:12.8px">Arnaud's script on the tutorial</span></div><div><br></div><div>I compared these two methods designed to calculate ERSPs</div><div><br></div><div>1) only with the GUI. a) I precompute the measures with the default parameters b) I plot ERSP of one channel from data of one subject. c) I can read all the values of the plot.</div><div><br></div><div>2) only with script. a) I ran the script described in the first email (adaptation from Arnaud's script).</div><div><br></div><div>The values from the two methods should be similar but it is not the case.</div><div><br></div><div><br></div><div>In other words, what does std_precomp and how (and why) is it different from pop_newtimef ?</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Simon</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 October 2016 at 23:37, Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Simon,<span class=""><div><br></div><div>> the values I get are completely different from when I use the GUI.<br></div><div class="gmail_extra"><br></div></span><span class=""><div class="gmail_extra">> if I want to run a script to get the same results as the ones obtained with the GUI<br></div><div class="gmail_extra"><br></div></span><div class="gmail_extra">But GUI operation does not return numerical data, right? It just shows a color plot. Judging from this, the difference you found was in time-frequency plot with unit? Sorry I still don't understand the differences you are talking about. </div><div class="gmail_extra"><br></div><div class="gmail_extra">The eegh() history can replicate the plot GUI operation makes, right? If it doese not work, let me know.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra">Makoto</div></font></span><div><div class="h5"><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 12, 2016 at 12:28 PM, Simon Recherche <span dir="ltr"><<a href="mailto:srigoulotresearch@gmail.com" target="_blank">srigoulotresearch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">They differ in everything, they are not similar or there is no obvious connection between them.<div><br></div><div>Maybe I was not clear:<div><br></div><div>When I use the GUI and compute ersp measures with default parameters, I get ERSP values that I can retrieve with commandlines such as [STUDY erspdata ersptimes erspfreqs pgroup pcond pinter] = std_erspplot(STUDY, ALLEEG,...)</div><div><br></div><div>When I run a script with <span style="color:rgb(0,0,0);font-family:'courier new';font-size:13.3333px">pop_newtimef </span>function (as written in the previous email) and same parameters, the values I get are completely different from when I use the GUI.</div></div><div><br></div><div><br></div><div>My question could be: if I want to run a script to get the same results as the ones obtained with the GUI, which function and parameters should I use ? I thought it was pop_newtimefunction and the aforementioned parameters but it does not seem to be the case.</div><div><br></div><div>Thanks for the help,</div><div><br></div><div>Simon</div></div><div class="m_4492331754338757102gmail-HOEnZb"><div class="m_4492331754338757102gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On 9 September 2016 at 17:43, Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Dear Simon,<div><br></div><div>Why don't you tell me more about how the results differ? I appreciate your patience.</div><div><br></div><div>Makoto</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_4492331754338757102gmail-m_-18851067984392133h5">On Thu, Sep 1, 2016 at 11:07 AM, Simon Recherche <span dir="ltr"><<a href="mailto:srigoulotresearch@gmail.com" target="_blank">srigoulotresearch@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="m_4492331754338757102gmail-m_-18851067984392133h5"><div dir="ltr">Hi all,<div><br></div><div>I am trying to compare different methods to get ERSP data from EEGLab.</div><div><br></div><div><br></div><div>When pre-computing the channel measures for ERSP, I noticed that default parameters are: 'cycles', [3 0.8], 'nfreqs', 100, 'ntimesout', 200</div><div><br></div><div>I tried to retrieve the same results by adapting Arnaud's script on the tutorial , for one subject and one electrode so it goes faster (see below).</div><div><br></div><div><br></div><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'courier new';color:black">clear </span><span style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">all</span><span style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'courier new';color:black">clc</span><span style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'courier new';color:black"> </span><span style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-family:'courier new';font-size:10pt">subject_list = { 'CA20SD'};</span><br></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-family:'courier new';font-size:12pt"> </span><br></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">nsubj = length(subject_list); </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:forestgreen">%
number of subjects </span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:forestgreen"> </span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">home_path = </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'D:\EEG_FGX_EEGLab_3\10.Channe<wbr>lsInterpolated\'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">;</span><br></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> </span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="color:black;font-family:'courier new';font-size:10pt"> allersp = zeros([100 200 1
nsubj]);</span><br></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> allitc = zeros([ 100 200 1
nsubj]);</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> allpowbase = zeros([ 1 100
1 nsubj]);</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> alltimes = zeros([ 1 200 1
nsubj]);</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> allfreqs = zeros([ 1 100 1
nsubj]);</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="color:forestgreen;font-family:'courier new';font-size:10pt"> </span><br></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:blue">for</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> subj=1:nsubj</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="color:black;font-family:'courier new';font-size:10pt"> </span><br></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:forestgreen">% Load dataset</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> fprintf(</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'\n\n\n**** %subj: Loading dataset ****\n\n\n'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">, subject_list{subj});</span><br></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> EEG = pop_loadset(</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'filename'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">,
[subject_list{subj} </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'_epochs.set'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">], </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'filepath'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">, home_path);</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:forestgreen"> </span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="color:forestgreen;font-family:'courier new';font-size:10pt">% Compute a time-frequency decomposition for every electrode</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:blue">for</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> elec = 77</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">[ersp,itc,powbase,times,freqs,<wbr>erspboot,itcboot] = pop_newtimef(EEG, 1,
elec, [EEG.xmin EEG.xmax]*1000, </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'cycles'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">, [3 0.8], </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'nfreqs'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">, 100, </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'ntimesout'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">, 200, </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'plotersp'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">,</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'off'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">, </span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'plotitc'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">,</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:rgb(160,32,240)">'off'</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">);</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><br></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> allersp (:,:,elec,subj) =
ersp;</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> allitc (:,:,elec,subj) = itc;</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> allpowbase (:,:,elec,subj) =
powbase;</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> alltimes (:,:,elec,subj) =
times;</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> </span><span style="font-size:10pt;font-family:'courier new';color:black">allfreqs (:,:,elec,subj) = freqs;</span><span style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:blue">end</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">;</span><br></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:blue">end</span><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black">;</span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-CA" style="font-size:10pt;font-family:'courier new';color:black"> </span><span lang="EN-CA" style="font-size:12pt;font-family:'courier new'"><span></span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><br></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><br></p><p class="MsoNormal" style="margin-bottom:0.0001pt">When I compare the matrix A = ersp(:,:,1,1) with the figure I get with the STUDY GUI (by selecting the proper channel and subjects), I dont have the same results. </p><p class="MsoNormal" style="margin-bottom:0.0001pt"><br></p><p class="MsoNormal" style="margin-bottom:0.0001pt">I tried to look at the <span style="color:rgb(0,0,0);white-space:pre-wrap">std_ersp() function to see if other inputs could help to make calculations similar but I did not find anything. </span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="color:rgb(0,0,0);white-space:pre-wrap">Thanks again,</span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="color:rgb(0,0,0);white-space:pre-wrap">Simon</span></p></div>
<br></div></div>______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/ee<wbr>glabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.uc<wbr>sd.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.e<wbr>du</a><span class="m_4492331754338757102gmail-m_-18851067984392133HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="m_4492331754338757102gmail-m_-18851067984392133HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_4492331754338757102gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</div></div></div></div>
</blockquote></div><br></div>