<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi Omer,
<div class=""><br class="">
</div>
<div class="">Maybe this can help. It filters and epochs before downsampling. It should be faster. However, that highly depends on the computer you have. I tried this with two different computer, with exactly the same characteristics. One was almost full, the
other not. It took 15 minutes for 64 electrodes on the new one, and 40 minutes on the full one.</div>
<div class=""><br class="">
</div>
<div class="">
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfgp = [];</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfgp.dataset = [ file.name];</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfgr = [];</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfgr.resamplefs = 256;</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfgr.detrend = <span class="" style="color: rgb(178, 69, 243); ">'yes'</span>;</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px; ">
<br class="webkit-block-placeholder">
</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45); ">
%% epochs before filtering</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfg1 = [];</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfg1.dataset = [ file.name];</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfg1.trialdef.eventtype = <span class="" style="color: rgb(178, 69, 243); ">'STATUS'</span>;</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45); ">
<span class="" style="color: rgb(0, 0, 0); "> cfg1.trialdef.eventvalue = [65]; </span></div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45); ">
<span class="" style="color: rgb(0, 0, 0); "> cfg1.trialdef.prestim = abs(windows(1));</span></div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfg1.trialdef.poststim = windows(2);</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfg1 = ft_definetrial(cfg1); </div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px; ">
<br class="webkit-block-placeholder">
</div>
<div style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px; ">
<br class="webkit-block-placeholder">
</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45); ">
%% filtres downsampling </div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> <span class="" style="color: rgb(4, 51, 255); ">for</span> i=1:nchans</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfg1.channel = i;</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfg1.bpfilter = <span class="" style="color: rgb(178, 69, 243); ">'yes'</span>; cfg1.bpfreq=[0.9 30];<span class="" style="color: rgb(37, 153, 45); ">%filtres</span></div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> datp = ft_preprocessing(cfg1);</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> singlechan{i} = ft_resampledata(cfgr, datp);</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> clear <span class="" style="color: rgb(178, 69, 243); ">datp</span></div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> <span class="" style="color: rgb(4, 51, 255); ">end</span></div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px; ">
<br class="webkit-block-placeholder">
</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> cfg = [];</div>
<div class="" style="margin: 0px; font-size: 10px; font-family: Courier; "> datall = ft_appenddata(cfg, singlechan{:});</div>
<div><br>
</div>
</div>
<div apple-content-edited="true">
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<p class="MsoNormal"><span lang="FR">---------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="FR">Emilie Caspar<o:p></o:p></span></b></p>
<div><span lang="FR"> </span><br class="webkit-block-placeholder">
</div>
<p class="MsoNormal"><span lang="FR">Aspirante FNRS - Ph.D. Student <o:p></o:p></span></p>
<div><span lang="FR"> </span><br class="webkit-block-placeholder">
</div>
<p class="MsoNormal"><span lang="FR">Consciousness, Cognition & Computation Group (CO3)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR">Centre de Recherche Cognition et Neurosciences (CRCN)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR">ULB Neurosciences Institute (UNI)<o:p></o:p></span></p>
<div><span lang="FR"> </span><br class="webkit-block-placeholder">
</div>
<p class="MsoNormal"><span lang="FR">Université Libre de Bruxelles <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR">Av. F.-D. Roosevelt, 50 <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR">1050 Bruxelles <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR">BELGIUM <o:p></o:p></span></p>
<div><span lang="FR"> </span><br class="webkit-block-placeholder">
</div>
<p class="MsoNormal"><span lang="FR">Voice : +32 2 650 32 95 <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR">mail : <a href="mailto:ecaspar@ulb.ac.be">ecaspar@ulb.ac.be</a> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR">office: DB10-138 <o:p></o:p></span></p>
</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br>
</div>
</div>
<div><br>
</div>
<br class="Apple-interchange-newline">
</div>
<br>
<div>
<div>On 20 mars 2015, at 12:49, Omer Sharon <<a href="mailto:omerxsharon@gmail.com">omerxsharon@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,153)">
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,153)">
Hi everybody<br>
<br>
</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,153)">
Thanks for answering, I'm reading through most of the answers here and it's very helpful.<br>
</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,153)">
I'm having trouble with loading of single (and several) channel sampled in 1000 Hz, but for about 8 hours - I get "out of memory" (from the ft_preprocessing)<br>
<br>
</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,153)">
Is there a way to downsample the data while loading? (before preprocessing)<br>
</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,153)">
or alternatively to load it in several parts (in the time dimension), downsample and then concatenate.<br>
<br>
</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,153)">
Thanks a lot<span class=""></span></div>
<span class=""><font color="#888888">
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,153)">
Omer </div>
</font></span></div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote>
</div>
<br>
</body>
</html>