<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
You’re welcome.
<div class=""><br class="">
</div>
<div class="">Yet, I wouldn’t say it’s fixed, but at least you have found a way around your problem.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On 20 Oct 2017, at 16:30, Maximilien Chaumon <<a href="mailto:maximilien.chaumon@gmail.com" class="">maximilien.chaumon@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="">Perfect! that fixed it, many thanks!<br class="">
<br class="">
</div>
Max<br class="">
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="">Le ven. 20 oct. 2017 à 09:35, Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl" class="">jan.schoffelen@donders.ru.nl</a>> a écrit :<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Max,<br class="">
<br class="">
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 class="">
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 class="">
<br class="">
<br class="">
ft_topoplotER(cfg, rmfield(big_spec_grad, ‘cfg’));<br class="">
<br class="">
Thanks,<br class="">
<br class="">
Jan-Mathijs<br class="">
<br class="">
<br class="">
<br class="">
> On 19 Oct 2017, at 11:18, Maximilien Chaumon <<a href="mailto:maximilien.chaumon@gmail.com" target="_blank" class="">maximilien.chaumon@gmail.com</a>> wrote:<br class="">
><br class="">
> Dear all,<br class="">
><br class="">
> I'm doing topoplots of rather large spectrum data focused on a tiny frequency portion<br class="">
>     cfg = [];<br class="">
>     cfg.parameter = 'logmpowspctrm';<br class="">
>     cfg.comment = 'no';<br class="">
>     cfg.xlim = [20 21];<br class="">
>     cfg.zlim = 'maxmin';<br class="">
>     cfg.layout = 'neuromag306all.lay';<br class="">
>     cfg.colorbar = 'no';<br class="">
>     big_spec_grad.dimord = 'chan_freq';<br class="">
>     ft_topoplotER(cfg,big_spec_grad);<br class="">
><br class="">
> This used to work fine until a last update this week from a version I suspect dated back to 03/17.<br class="">
> Now today, the ft_topoplotER line eats up a lot of memory<br class="">
> the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB<br class="">
> the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 1283 MB<br class="">
> the call to "ft_topoplotER" took 1 seconds and required the additional allocation of an estimated 1283 MB<br class="">
><br class="">
> 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 class="">
><br class="">
> I traced down the memory leak to ft_selectdata line 1281 in a subfunction called cellmatselect.<br class="">
>       x = x(:,selindx,:,:,:,:);<br class="">
> 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 class="">
> 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 class="">
><br class="">
> Any help is much appreciated.<br class="">
> Thanks!<br class="">
> Max<br class="">
> _______________________________________________<br class="">
> fieldtrip mailing list<br class="">
> <a href="mailto:fieldtrip@donders.ru.nl" target="_blank" class="">fieldtrip@donders.ru.nl</a><br class="">
> <a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>