<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Robin,<br>
      <br>
      yep, that sounds pretty much like a bug to me. Would you mind
      creating a bug on bugzilla for this?<br>
      <a class="moz-txt-link-freetext" href="http://bugzilla.fcdonders.nl/">http://bugzilla.fcdonders.nl/</a><br>
      I will try to look into this next week. Thanks so far for
      reporting this.<br>
      <br>
      Best,<br>
      Jörn<br>
      <br>
      On 4/26/2013 11:11 AM, Robin wrote:<br>
    </div>
    <blockquote
cite="mid:CALsWBNNuhwtRfWWKYtro+px24P4ATs0Sf4Ktga3SNZ7eu9RK2Q@mail.gmail.com"
      type="cite">
      <div
        style="font-size:1em;font-family:Helvetica,arial,freesans,clean,sans-serif;color:rgb(34,34,34);background-color:rgb(255,255,255);border:medium
        none;line-height:1.2" class="markdown-here-wrapper"
        id="markdown-here-wrapper-681944">
        <p style="margin:1em 0px">Hello,</p>
        <p style="margin:1em 0px">Is it possible filter in-memory
          extracted trials data with mirroring at the edges?</p>
        <p style="margin:1em 0px">When I try:</p>
        <pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px 3px 3px 3px;display:inline;white-space:pre;border-radius:3px 3px 3px 3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background:none repeat scroll 0% 0% rgb(248,248,255)" class="language-matlab"><span style="color:rgb(153,153,136);font-style:italic" class="comment">% filter</span>
cfg = <span class="matrix">[]</span>;
<span class="transposed_variable">cfg.</span>lpfilter = <span style="color:rgb(221,17,68)" class="string">'yes'</span>;
<span class="transposed_variable">cfg.</span>lpfreq = <span style="color:rgb(221,17,68)" class="string">'40'</span>;
<span class="transposed_variable">cfg.</span>lpfilttype = <span style="color:rgb(221,17,68)" class="string">'but'</span>;
<span class="transposed_variable">cfg.</span>padtype = <span style="color:rgb(221,17,68)" class="string">'mirror'</span>;
<span style="color:rgb(153,153,136);font-style:italic" class="comment">% trial length is 1.1s so mirror-pad to 1.5s (200ms each side)</span>
<span class="transposed_variable">cfg.</span>padding = <span style="color:rgb(0,153,153)" class="number">1.5</span>;
flt_data = ft_preprocessing(cfg, block_data);</code></pre>
        <p style="margin:1em 0px">I get:</p>
        <pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px 3px 3px 3px;display:inline;white-space:pre;border-radius:3px 3px 3px 3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background:none repeat scroll 0% 0% rgb(248,248,255)">Reference to non-existent field 'Fs'.

Error in ft_preprocessing (line 288)
      padding = round(cfg.padding * data.Fs);</code></pre>
        <p style="margin:1em 0px">Adding <code
            style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px
            0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid
            rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px
            3px 3px 3px;display:inline">block_data.Fs =
            block_data.fsample;</code> seems to work. But in the
          resulting data structure the time vectors no longer match the
          trial data, so obviously something is going wrong:</p>
        <pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px 3px 3px 3px;display:inline;white-space:pre;border-radius:3px 3px 3px 3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background:none repeat scroll 0% 0% rgb(248,248,255)">>> size(block_data.time{1})

ans =

     1   560

>> size(block_data.trial{1})

ans =

   234   560

>> size(flt_data.trial{1})

ans =

   234   560

>> size(flt_data.time{1})

ans =

     1   357</code></pre>
        <p style="margin:1em 0px">Is there a correct way to do this?
          (Filter trials with mirrored edges)</p>
        <p style="margin:1em 0px">Thanks,</p>
        <p style="margin:1em 0px">Robin</p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour 
Centre for Cognitive Neuroimaging
Radboud University Nijmegen 
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel:    +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
  </body>
</html>