Hi Jörn,<br><br>Thanks:<br><a href="http://bugzilla.fcdonders.nl/show_bug.cgi?id=2140">http://bugzilla.fcdonders.nl/show_bug.cgi?id=2140</a><br><br>Cheers<br><br>Robin<br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 10:37 AM, "Jörn M. Horschig" <span dir="ltr"><<a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>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 href="http://bugzilla.fcdonders.nl/" target="_blank">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<div><div class="h5"><br>
<br>
On 4/26/2013 11:11 AM, Robin wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div style="line-height:1.2;color:rgb(34,34,34);font-size:1em;font-family:Helvetica,arial,freesans,clean,sans-serif;border:medium none">
<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-wrap;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)"><span style="color:rgb(153,153,136);font-style:italic">% filter</span>
cfg = <span>[]</span>;
<span>cfg.</span>lpfilter = <span style="color:rgb(221,17,68)">'yes'</span>;
<span>cfg.</span>lpfreq = <span style="color:rgb(221,17,68)">'40'</span>;
<span>cfg.</span>lpfilttype = <span style="color:rgb(221,17,68)">'but'</span>;
<span>cfg.</span>padtype = <span style="color:rgb(221,17,68)">'mirror'</span>;
<span style="color:rgb(153,153,136);font-style:italic">% trial length is 1.1s so mirror-pad to 1.5s (200ms each side)</span>
<span>cfg.</span>padding = <span style="color:rgb(0,153,153)">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-wrap;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-wrap;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></fieldset>
<br>
</div></div><pre>_______________________________________________
fieldtrip mailing list
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<br>
<pre 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 href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a>
Tel: <a href="tel:%2B31-%280%2924-36-68493" value="+31243668493" target="_blank">+31-(0)24-36-68493</a>
Web: <a href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
</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><br>