[FieldTrip] important fix in latest FieldTrip release

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Wed Aug 10 09:35:16 CEST 2022


Dear all,

We have just released a new FieldTrip version, which includes an important fix of a bug that may have affected the outcome of your analyses if you are using a FieldTrip version with a release tag between 20220519 and 20220729.

This ‘bug’ has been introduced in the release version 20220519 and and may have affected the outcome of analyses steps that used the drop-in replacement resample.m function from the fieldtrip/external/signal folder. 

The long story short is, that the fieldtrip/external/signal folder contains a set of drop-in replacement functions for original MATLAB signal processing toolbox. These drop ins are 1) a service to users who don’t have a license for the respective toolbox, and 2) help keep the license load low in case of massive processing. Typically, FieldTrip uses the drop-in replacement functions, if available.
 
Before 20220519 the drop-in replacement of resample did not exist, which means that FieldTrip functions such as ft_resampledata and ft_specest_irasa only worked well with the signal processing toolbox installed.

The drop-in replacement for resample.m that I contributed to the code base (mea culpa) - however - contained a bug The resampled time series in the function’s output were a scaled version of the correct output, where the scaling factor was a function of the input and output sampling rates of the time series. This incorrect scaling has been fixed in the new release.

Now, does this bug affect your analyses? Strictly speaking it does, provided that your analyses incorporate steps that resample data (i.e. using ft_resampledata, or using the ‘irasa’ method for spectral decomposition and splitting periodic from non-periodic signal components), and provided that the global variable ft_default.toolbox.signal was set to ‘compat’. (the latter is the default, so unless you change it by hand it would have been so). 

Now, the consequence of the scaled output in principle is incorrect, but whether or not it affects the final inferential conclusion of your analysis depends on the downstream processing. For instance, the scale of the data will not affect the final contrast T-value (as long as the scaling is the same across all conditions and subjects).

Nonetheless, for the sake of ‘better being safe than sorry’ it would be advisable to check - and if buggy - redo all downstream-to-resampling analysis steps using the freshest FT-version. Of course this is needed only if you are using a FieldTrip version with a release tag between 20220519 and 20220729.

Apologies for any inconvenience caused by this.

Best wishes,
Jan-Mathijs









More information about the fieldtrip mailing list