Back to the main page.

Bug 2450 - ft_rejectvisual fails on data that is all-zero

Status CLOSED FIXED
Reported 2014-01-22 17:00:00 +0100
Modified 2014-03-06 15:37:10 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2014-01-22 17:00:49 +0100

data = [] data.label = {'a'} data.time = {1:1000}; data.trial = {zeros(1,1000)}; cfg = []; ft_rejectvisual(cfg, data) gives an error (as reported On 22 Jan 2014 by Ozan Ça?layan).


Jan-Mathijs Schoffelen - 2014-01-23 08:43:06 +0100

The reported error is probably due to the fact that there is just 1 trial, not because it contains all zeros. The all zero probably fails due to the variance being nan, the 1 trial fails because there's just one trial. A single trial of all zeros therefore probably fails for two reasons. ;-)


Jan-Mathijs Schoffelen - 2014-01-25 09:40:08 +0100

I think that in principle the function should work on the 1 channel / 1 trial case (even if the numeric data are non-zero).


Jan-Mathijs Schoffelen - 2014-01-29 13:33:00 +0100

bash-4.1$ svn commit -m "bugfix - adjusted axis limits to prevent crash when only a single trial in input" private/rejectvisual_summary.m Sending private/rejectvisual_summary.m Transmitting file data . Committed revision 9138.