<div dir="ltr">Dear Andrade,<div><br></div><div>You could have a look here for some tips on memory efficiency: <a href="http://www.fieldtriptoolbox.org/tutorial/memory/">http://www.fieldtriptoolbox.org/tutorial/memory/</a> Probably most relevant to you: change the data precision to single, rather than double (saves ~50%).</div><div><br></div><div>Best,</div><div>Eelke</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 21 Jun 2020 at 22:34, Andrade Rey René <<a href="mailto:rene.andrade@edu.uah.es">rene.andrade@edu.uah.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<div style="overflow-wrap: break-word;">
Dear experts:
<div>I am running this code </div>
<div><br>
</div>
<div>
<pre style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13.2px;margin-top:0px;margin-bottom:0px;overflow:auto;color:rgb(33,37,41);background-color:rgb(240,240,240);font-variant-ligatures:normal"><code style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:inherit;color:inherit;word-break:normal"><span style="box-sizing:border-box">cfg</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span style="box-sizing:border-box">[];</span>
<span style="box-sizing:border-box">cfg</span><span style="box-sizing:border-box;color:rgb(102,102,102)">.</span><span style="box-sizing:border-box">headmodel</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span style="box-sizing:border-box">headmodel</span><span style="box-sizing:border-box">;</span>
<span style="box-sizing:border-box">cfg</span><span style="box-sizing:border-box;color:rgb(102,102,102)">.</span><span style="box-sizing:border-box">sourcemodel</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span style="box-sizing:border-box">leadfield</span><span style="box-sizing:border-box">;</span>
<span style="box-sizing:border-box">cfg</span><span style="box-sizing:border-box;color:rgb(102,102,102)">.</span><span style="box-sizing:border-box">method</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span style="box-sizing:border-box;color:rgb(64,112,160)">'lcmv'</span><span style="box-sizing:border-box">;</span>
<span style="box-sizing:border-box">cfg</span><span style="box-sizing:border-box;color:rgb(102,102,102)">.</span><span style="box-sizing:border-box">lcmv</span><span style="box-sizing:border-box;color:rgb(102,102,102)">.</span><span style="box-sizing:border-box">projectmom</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span style="box-sizing:border-box;color:rgb(64,112,160)">'yes'</span><span style="box-sizing:border-box">;</span> <span style="box-sizing:border-box;color:rgb(96,160,176);font-style:italic">% project dipole time series in direction of maximal power (see below)</span>
<span style="box-sizing:border-box">cfg</span><span style="box-sizing:border-box;color:rgb(102,102,102)">.</span><span style="box-sizing:border-box">lcmv</span><span style="box-sizing:border-box;color:rgb(102,102,102)">.</span><span style="box-sizing:border-box">kurtosis</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span style="box-sizing:border-box;color:rgb(64,112,160)">'yes'</span><span style="box-sizing:border-box">;</span> <span style="box-sizing:border-box;color:rgb(96,160,176);font-style:italic">% compute kurtosis at each location</span>
<span style="box-sizing:border-box">source</span> <span style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span style="box-sizing:border-box">ft_sourceanalysis</span><span style="box-sizing:border-box">(</span><span style="box-sizing:border-box">cfg</span><span style="box-sizing:border-box">,</span> <span style="box-sizing:border-box">cov_matrix</span><span style="box-sizing:border-box">);</span></code></pre>
<div><br>
</div>
</div>
<div>Of <a href="http://www.fieldtriptoolbox.org/tutorial/epilepsy/" target="_blank">http://www.fieldtriptoolbox.org/tutorial/epilepsy/</a>. And I think  I run out of memory because with “top” I can see the computer stops responding when near 85% of RAM memory(16GB). </div>
<div><br>
</div>
<div>I cannot report any error because the only problem seems to be that either wrong code or wrong data or I don’t know. </div>
<div><br>
</div>
<div>Best,</div>
<div>Andrade.  </div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>