<div dir="ltr"><div>Perfect! that fixed it, many thanks!<br><br></div>Max<br></div><br><div class="gmail_quote"><div dir="ltr">Le ven. 20 oct. 2017 à 09:35, Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Max,<br>
<br>
>From your (otherwise clear) description, I am not sure whether your issue is due to the actual data selection itself. Rather, my first thought would be that something goes amiss with recursive piling up of large amounts of irrelevant (for the plotting at least) metadata, that gets assembled while iterating through subsequent interactive plotting steps.<br>
It’s kind of a long story, which I am not going to type down here, but to check whether I am thinking into the right direction, could you see whether your problem persists if you call ft_topoplotER in the following way?<br>
<br>
<br>
ft_topoplotER(cfg, rmfield(big_spec_grad, ‘cfg’));<br>
<br>
Thanks,<br>
<br>
Jan-Mathijs<br>
<br>
<br>
<br>
> On 19 Oct 2017, at 11:18, Maximilien Chaumon <<a href="mailto:maximilien.chaumon@gmail.com" target="_blank">maximilien.chaumon@gmail.com</a>> wrote:<br>
><br>
> Dear all,<br>
><br>
> I'm doing topoplots of rather large spectrum data focused on a tiny frequency portion<br>
> cfg = [];<br>
> cfg.parameter = 'logmpowspctrm';<br>
> cfg.comment = 'no';<br>
> cfg.xlim = [20 21];<br>
> cfg.zlim = 'maxmin';<br>
> cfg.layout = 'neuromag306all.lay';<br>
> cfg.colorbar = 'no';<br>
> big_spec_grad.dimord = 'chan_freq';<br>
> ft_topoplotER(cfg,big_spec_grad);<br>
><br>
> This used to work fine until a last update this week from a version I suspect dated back to 03/17.<br>
> Now today, the ft_topoplotER line eats up a lot of memory<br>
> the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB<br>
> the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 1283 MB<br>
> the call to "ft_topoplotER" took 1 seconds and required the additional allocation of an estimated 1283 MB<br>
><br>
> This gets more dramatic the second time this part of the script runs (with 2500MB added for reach topoplot) and then crashes on the next iteration with all of 30GB RAM eaten up by this.<br>
><br>
> I traced down the memory leak to ft_selectdata line 1281 in a subfunction called cellmatselect.<br>
> x = x(:,selindx,:,:,:,:);<br>
> The memory usage jumps every time this dimension gets selected. (I admit I do have a lot of frequencies, over 13000, but I need them for my application).<br>
> Memory comes back to a normal level when the figure is closed, but as I said, execution with another dataset eats up double the amount of memory and I don't know how to get out of this...<br>
><br>
> Any help is much appreciated.<br>
> Thanks!<br>
> Max<br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><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>
<br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div>