<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>Hi FieldTrippers,<br>
<br>
</div>
<div>I hope someone can help me with the following.<br>
</div>
<div><br>
</div>
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>
</div>
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>
</div>
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>
</div>
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>
</div>
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>
</div>
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>
</div>
Best wishes,<br>
</div>
Stephen<br>
<div>
<div>
<div><br>
<br>
</div>
</div>
</div>
</div>
</body>
</html>