<div dir="ltr"><div><div><div><div>Dear Tzvetomir,<br><br></div>Thank you so much! That is very helpful.<br></div><br>And I concur fully with the praise of FT, and the mailinglist :-)<br><br></div>Best wishes,<br></div>Stephen<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 26 May 2016 at 08:02, Tzvetomir <span dir="ltr"><<a href="mailto:tzvetan@ustc.edu.cn" target="_blank">tzvetan@ustc.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Dear Stephen,</p>
<p>you could also apply the nanconv() function of B.Kraus, available
on Matlab's fileexchange.<br>
</p>
<p>(<a href="http://www.mathworks.com/matlabcentral/fileexchange/41961-nanconv" target="_blank">http://www.mathworks.com/matlabcentral/fileexchange/41961-nanconv</a>)</p>
<p>I'm doing my own wavelet processing for the reason that part of
my epochs are filled with nan's due to experimental design.</p>
<p>But fieldtrip website remains a huge source of infos, tips and
solutions where to look for :)</p>
<p>all the best,</p>
<p>Tzvetomir<br>
</p><div><div class="h5">
<div>On 2016-05-25 10:08 PM, Stephen
Whitmarsh wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>As a follow-up: I guess the best solution in the case
would then be to make my TFR, and replace those values with
nans based on the sample number from the time-series
artifact detection. <br>
<br>
</div>
Cheers,<br>
</div>
Stephen<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 25 May 2016 at 15:58, Stephen
Whitmarsh <span dir="ltr"><<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div>Hi Jim!<br>
<br>
</div>
Thanks. Ofcourse, that's the problem. However, method
= 'wavelet', and method = 'tfr' give the same problem.
I'm afraid I'll end up writing my own code, cutting up
data and using an FFT :-/<br>
<br>
</div>
Thank again,<br>
<br>
</div>
Stephen<br>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 25 May 2016 at 15:34,
Herring, J.D. (Jim) <span dir="ltr"><<a href="mailto:j.herring@donders.ru.nl" target="_blank"></a><a href="mailto:j.herring@donders.ru.nl" target="_blank">j.herring@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">Hi
Stephen,<br>
<br>
As far as I know this is expected as mtmconvol is
actually multiplying the fft of the entire trial
with the fft of your tapered windows. Perhaps it
will work of you use one of the methods that
actually uses convolution in the time domain
rather than multiplication in the frequency
domain.<br>
<br>
Best,<br>
<br>
Jim<br>
<div>
<div><br>
<br>
<br>
> On 25 May 2016, at 15:29, Stephen
Whitmarsh <<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a>>
wrote:<br>
><br>
> Hi FieldTrippers,<br>
><br>
> I hope someone can help me with the
following.<br>
><br>
> My problem is that I like to maintain my
original rpt/chan/time/freq size after
artefact rejection based on the time series
data, i.e. to have the same dimensions of the
TFR as if I did not reject data. This is for
reasons of bookkeeping between different types
of channels that are processed differently
throughout my analysis.<br>
><br>
> What works well is to detect artifacts in
the data and replace those intervals with nans
using ft_rejectartifact, with cfg.reject =
'nan'. So far this is perfect for the approach
I had in mind.<br>
><br>
> However, ft_freqanalysis (method =
'mtmconvol') outputs whole trials as nans
whenever a (small) period has nans. What I
would need - and in fact expect - is that only
those time/frequency windows that have (one or
more) nan values will output nan, while the
rest should merrily go round giving power
values. After all, the data is there.<br>
><br>
> It is unclear to me whether this is
expected behaviour or not. I might be making a
mistake but some simple tests replicated this
behaviour.<br>
><br>
> Is there a solution that still allows me
to end up with a rpt/chan/time/freq
representation of the same size as when i
would not have rejected artifacts?<br>
><br>
> The only other FieldTrip-like option I
can think of is to use ft_rejectartifact with
method = 'partial', do the freqanalysis on
trial parts, and somehow glue the separate
trial parts together again afterwards. But I
really don't want to go in that direction.<br>
><br>
> In the end I'm afraid I don't understand
the core of ft_specest_mtmconvol enough to see
where I could hack it. I hope some of you
might be able to help.<br>
><br>
> Best wishes,<br>
> Stephen<br>
><br>
><br>
</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" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><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" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<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>
</div></div><pre cols="72">--
__________________________________________________
Tzvetomir Tzvetanov, PhD
(赐为)
Associate Professor
Vision Research Laboratory, School of Life Sciences,
CAS Key Laboratory of Brain Function and Disease,
University of Science & Technology of China
Hefei, Anhui 230027, P.R.China
<a href="http://vision.ustc.edu.cn/" target="_blank">http://vision.ustc.edu.cn/</a>
Email: <a href="mailto:tzvetan@ustc.edu.cn" target="_blank">tzvetan@ustc.edu.cn</a>
</pre>
</div>
</blockquote></div><br></div>