[FieldTrip] improved edge behavior for cfg.boxcar in ft_preprocessing

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Fri Sep 14 14:42:10 CEST 2012

Dear all,

I just pushed an improved version of boxcar smoothing to the svn-repository (will be available for download as of tonight). I just want to mention it, because it behaves slightly different from what you are used to (provided you actually ever use the option cfg.boxcar in ft_preprocessing). In a nutshell, the old implementation did an implicit zero-padding when performing the boxcar convolution. This could sometimes lead to ugly edges, if the local mean of the data (close to the edge) significantly deviated from 0. Therefore I implemented an explicit padding with the local mean value. You can read the code in ft_preproc_smooth. Since I think this change entails a significant improvement, and the old implementation was far from ideal, I decided to not support backward compatibility in this case. This means that you will not be able to reproduce the bad edge behavior of FT's boxcar functionality on your data anymore. Too bad.

Happy computing and with best wishes,


Jan-Mathijs Schoffelen, MD PhD 

Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120914/c11322c4/attachment-0001.html>

More information about the fieldtrip mailing list