<div dir="ltr">Hi Emilie,<div><br></div><div>It seems from the code pasted that you're still trying to read all channels in at once:</div><div><span style="font-family:Courier;font-size:10px">cfgp.channel = </span><span style="font-family:Courier;font-size:10px;color:rgb(178,69,243)">'all'</span><span style="font-family:Courier;font-size:10px">;</span><br></div><div><br></div><div>Try reading in & downsampling one channel at a time, as Haiteng suggested with the following link:</div><div><a href="http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory" target="_blank" style="font-size:13px">http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory</a><br></div><div><br></div><div>Hope that solves it for you,</div><div>Arjen</div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-14 21:44 GMT+01:00 Caspar, Emilie <span dir="ltr"><<a href="mailto:e.caspar@ucl.ac.uk" target="_blank">e.caspar@ucl.ac.uk</a>></span>:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
Dear Haiteng
<div><br>
</div>
<div>Thank you for your suggestion. I tried but again, the downsample with this procedure takes more than 40 minutes (I gave up after this time period and stopped the script, the computer was crashing).</div>
<div><br>
</div>
<div>Perhaps one could tell if the following is correct? I'm maybe wrong somewhere.</div>
<div><br>
</div>
<div>
<div style="margin:0px;font-size:10px;font-family:Courier;color:rgb(37,153,45)">
<span style="color:#000000">chansAll    = 1:68;</span>%{'CPz', 'Cz', 'FCz', 'Fz'}</div>
<div style="margin:0px;font-size:10px;font-family:Courier">chansEEG    = 1:64;</div>
<div style="margin:0px;font-size:10px;font-family:Courier">nchans=length(chansEEG);</div>
<div><br>
</div>
<div>
<div>
<div style="margin:0px;font-size:10px;font-family:Courier;color:rgb(178,69,243)">
<span style="color:#000000">display(</span>'downsample each channel'<span style="color:#000000">)</span></div>
<div style="margin:0px;font-size:10px;font-family:Courier;color:rgb(178,69,243)">
<span style="color:#000000"><br>
</span></div>
<div style="margin:0px;font-size:10px;font-family:Courier"><span style="color:#0433ff">for</span> i=1:nchans</div>
<div style="margin:0px;font-size:10px;font-family:Courier">  cfgp         = [];</div>
<div style="margin:0px;font-size:10px;font-family:Courier">  cfgp.dataset     = [ <a href="http://file.name" target="_blank">file.name</a>];</div>
<div style="margin:0px;font-size:10px;font-family:Courier">  cfgp.channel =
<span style="color:#b245f3">'all'</span>;</div>
<div style="margin:0px;font-size:10px;font-family:Courier">  datp         = ft_preprocessing(cfgp);</div>
<p style="margin:0px;font-size:10px;font-family:Courier;min-height:12px">
  <br>
</p>
<div style="margin:0px;font-size:10px;font-family:Courier">  cfgr            = [];</div>
<div style="margin:0px;font-size:10px;font-family:Courier">  cfgr.resamplefs = 512; </div>
<div style="margin:0px;font-size:10px;font-family:Courier">  datr{i}         = ft_resampledata(cfgr, datp);</div>
<p style="margin:0px;font-size:10px;font-family:Courier;min-height:12px">
  <br>
</p>
<div style="margin:0px;font-size:10px;font-family:Courier">  clear <span style="color:#b245f3">
datp</span></div>
</div>
<div style="margin:0px;font-size:10px;font-family:Courier"><span style="color:#b245f3"><br>
</span></div>
<div>
<div style="margin:0px;font-size:10px;font-family:Courier">cfg = [];</div>
<div style="margin:0px;font-size:10px;font-family:Courier">datall = ft_appenddata(cfg, datr{:});</div>
<p style="margin:0px;font-size:10px;font-family:Courier;min-height:12px">
    <br>
</p>
<div style="margin:0px;font-size:10px;font-family:Courier">display(<span style="color:#b245f3">'Filters'</span>)</div>
<p style="margin:0px;font-size:10px;font-family:Courier;min-height:12px">
 <br>
</p>
<div style="margin:0px;font-size:10px;font-family:Courier">    cfg = [];</div>
<div style="margin:0px;font-size:10px;font-family:Courier">    cfg.bpfilter    =
<span style="color:#b245f3">'yes'</span>;</div>
<div style="margin:0px;font-size:10px;font-family:Courier">    cfg.bpfreq      = bpfilterRange;</div>
<div style="margin:0px;font-size:10px;font-family:Courier">    cfg.bpfiltord   = bpfilterOrder;</div>
<div style="margin:0px;font-size:10px;font-family:Courier">    cfg.reref       =
<span style="color:#b245f3">'yes'</span>;</div>
<div style="margin:0px;font-size:10px;font-family:Courier">    cfg.refchannel  = chansRef;</div>
<div style="margin:0px;font-size:10px;font-family:Courier">    allData_preprosses = ft_preprocessing(cfg, datall);</div>
</div>
<div><br>
</div>
Thanks again! </div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>Emilie</div></font></span><div><div class="h5">
<br>
<div>
<div>On 13 déc. 2014, at 14:49, Haiteng Jiang <<a href="mailto:haiteng.jiang@gmail.com" target="_blank">haiteng.jiang@gmail.com</a>> wrote:</div>
<br>
<blockquote type="cite">
<div dir="ltr">Hi  Emilie,
<div>     You can read  each channel and then  down sample.   In the end , you append all the channel. For more information and how to , you can refer to the FAQ:
<a href="http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory" target="_blank">
http://fieldtrip.fcdonders.nl/faq/how_can_i_preprocess_a_dataset_that_is_too_large_to_fit_into_memory</a>.</div>
<div>   </div>
<div>       Hope this helps,</div>
<div>            Haiteng<br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 13 December 2014 at 12:00, <span dir="ltr"><<a href="mailto:fieldtrip-request@science.ru.nl" target="_blank">fieldtrip-request@science.ru.nl</a>></span> wrote:
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Send fieldtrip mailing list submissions to<br>
        <a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:fieldtrip-request@science.ru.nl" target="_blank">fieldtrip-request@science.ru.nl</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:fieldtrip-owner@science.ru.nl" target="_blank">fieldtrip-owner@science.ru.nl</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of fieldtrip digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Correction baseline : removing the mean value or high-pass<br>
      filtering ? (Kristensen Emmanuelle)<br>
   2. Question about how to reduce the file size (Caspar, Emilie)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 12 Dec 2014 15:49:10 +0100<br>
From: Kristensen Emmanuelle<br>
        <<a href="mailto:emmanuelle.kristensen@gipsa-lab.grenoble-inp.fr" target="_blank">emmanuelle.kristensen@gipsa-lab.grenoble-inp.fr</a>><br>
To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
Subject: [FieldTrip] Correction baseline : removing the mean value or<br>
        high-pass filtering ?<br>
Message-ID: <<a href="mailto:548B0066.3090309@gipsa-lab.grenoble-inp.fr" target="_blank">548B0066.3090309@gipsa-lab.grenoble-inp.fr</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
Hi,<br>
I would need your opinion, please.<br>
Generally, the baseline correction means to remove a mean value from<br>
each epoch. I am wondering if a high pass filter, applied on the whole<br>
recorded signal, can perform the baseline correction.<br>
What do you think?<br>
Regards<br>
Emmanuelle<br>
<br>
--<br>
Emmanuelle KRISTENSEN<br>
Doctorante au Gipsa-Lab<br>
Equipe VIBS<br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1ceca823/attachment-0001.html" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1ceca823/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 12 Dec 2014 22:24:17 +0000<br>
From: "Caspar, Emilie" <<a href="mailto:e.caspar@ucl.ac.uk" target="_blank">e.caspar@ucl.ac.uk</a>><br>
To: "<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>" <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
Subject: [FieldTrip] Question about how to reduce the file size<br>
Message-ID: <<a href="mailto:484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk" target="_blank">484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Dear Fieltrippers,<br>
I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved.<br>
<br>
So I would like to see how to reduce the size of my sample BEFORE the filters.<br>
<br>
I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different
 informations).<br>
<br>
Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions:<br>
- Can I pre-process only some electrodes? Does it really reduce size for next preprocesses?<br>
- Is this the correct way to ask? As it crashes, not sure it works.<br>
<br>
    cfg             = [];<br>
    cfg.dataset     = [ <a href="http://file.name/" target="_blank">file.name</a>];<br>
    cfg.channel     = 'B5', 'B6', 'B15', 'B16';<br>
    allData_prepross = ft_preprocessing(cfg);<br>
    cfg.resamplefs = 256;<br>
    DataSample = ft_resampledata(cfg, allData_prepross)<br>
<br>
<br>
I would appreciate pieces of advice!<br>
<br>
Many thanks :)<br>
<br>
Emilie<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1fa62a62/attachment-0001.html" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141212/1fa62a62/attachment-0001.html</a>><br>
<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="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>
End of fieldtrip Digest, Vol 49, Issue 12<br>
*****************************************<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">
<div>
<div>Haiteng Jiang </div>
<div>PhD candidate</div>
<div>Donders Institute for Brain, Cognition and Behaviour</div>
<div>Neuronal Oscillations Group </div>
<div>Computational Cognitive Neuroscience Lab</div>
</div>
<div><font face="arial, helvetica, sans-serif"><a href="https://sites.google.com/site/haitengjiang/" target="_blank">https://sites.google.com/site/haitengjiang/</a></font></div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote>
</div>
<br>
</div></div></div>
</div>

<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div></div>