<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">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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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.<wbr>ChannelsInterpolated\'</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>______________________________<wbr>_________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" rel="noreferrer" target="_blank">http://sccn.ucsd.edu/eeglab/<wbr>eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.<wbr>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">eeglablist-request@sccn.ucsd.<wbr>edu</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_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>