[FieldTrip] code update: ft_timelockanalysis
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Wed Nov 21 14:47:07 CET 2018
As you know, the FieldTrip development model is based on continuous incremental improvements, where changes are made to the code repository on github, sometimes multiple times per day. In our implicit code of conduct, one of our core values is to maintain backward compatibility. This means that we not only aim not to break properly functioning user scripts that have been written with a (not too outdated) slightly older version of the FieldTrip code, but also that we aim at function behavior being stable over time (unless we find a bug in the code), both in terms of settings of the default parameters, and in terms of numerical output.
Occasionally, we decide to slightly sacrifice backward compatibility at the benefit of overall code consistency and maintainability. Usually, we don’t write an e-mail to the list when this happens, because everything is properly documented on github or bugzilla, and we don’t want to bother you with these mundane issues, but today I make an exception.
The reason for this is that I re-implemented ft_timelockanalysis, which is one of the oldest FieldTrip functions and a loyal companion in many an analysis project over the past 15 years. Since I assume that this is a function that many of you use, I just want to make you aware of this. The most noticeable (if at all) changes are:
1) the option cfg.vartrllength has been deprecated.
2) the default behavior has changed from expecting the trials of the input data to have fixed length (and throwing an error otherwise) into full support of variable trial lengths, representing missing data as NaNs.
3) if you want to explicitly use the old option cfg.vartrllength=0 you should now specify cfg.latency = ‘minperiod’
4) with the cfg.keeptrials you will either get an output structure with a single trial representation or with an average representation, not with both. This means that structures with both a ‘trial’, and ‘avg’ field will not be generated anymore.
Probably, you won’t need to change anything in your scripts, but since it is difficult to foresee all possible scenarios you might want to think this over yourself.
J.M.Schoffelen, MD PhD
Senior Researcher, VIDI-fellow - PI, language in interaction
Physical location: room 00.028
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fieldtrip