[FieldTrip] ft_rejectvisual reduces trial length

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Fri Nov 9 11:18:26 CET 2018

Hi Tineke,

This is indeed inappropriate behaviour of the function, which has been tracked down to something going wrong in ft_selectdata.
I have submitted a PR https://github.com/fieldtrip/fieldtrip/pull/873 on the github-repo which fixes the issue https://github.com/fieldtrip/fieldtrip/issues/871
I am pretty sure that this fix does not come with unwanted side effects, but since ft_selectdata is used almost everywhere I’d appreciate some moral support before merging.

Let me know what you think.


PS: for those who are around: please do join Tineke and me this coming Sunday Nov 11, when we will commemorate the centenary of the 1918 armistice with a choral concert at the church of St. Anthony of Padua in Nijmegen. It starts at 15.30, see http://www.kamerkoormnemosyne.nl

J.M.Schoffelen, MD PhD
Senior Researcher, VIDI-fellow - PI, language in interaction
Telephone: +31-24-3614793
Physical location: room 00.028
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands

On 7 Nov 2018, at 13:28, Snijders, T.M. (Tineke) <tineke.snijders at donders.ru.nl<mailto:tineke.snijders at donders.ru.nl>> wrote:


I am using trials of different lengths, which seems to give a problem in ft_rejectvisual. It wasn’t a problem before (I think in 2016) when I did the same analysis.

When using ft_rejectvisual, in the current fieldtrip version in the output data all trial lengths are reduced to the shortest trial-length, cutting away the remainder of the trial. In the command window it gives a warning of ‘inconsistent sampling info’.

Is there a workaround to still get the full trial-lengths for the artifact rejected data? I do want to keep the complete trials at this point.



Dr T.M. Snijders
Research Staff
Max Planck Institute for Psycholinguistics, Nijmegen

MPI | Wundtlaan 1 | Room 246 | tel 024 35 21246 | PO Box 310 | 6500 AH Nijmegen

fieldtrip mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181109/ec887ac7/attachment-0002.html>

More information about the fieldtrip mailing list