Back to the main page.

Bug 1474 - rejectvisual summary fails on single-channel data

Status REOPENED
Reported 2012-05-13 13:40:00 +0200
Modified 2016-01-06 20:42:17 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Eelke Spaak
URL:
Tags:
Depends on:
Blocks:
See also: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3005

Robert Oostenveld - 2012-05-13 13:40:31 +0200

This was initially reported by Rodrigo (CC). It fails with the following error: Error using set Bad property value found. Object Name : axes Property Name : 'YLim' Values must be increasing and non-NaN. Error in axis>LocSetLimits (line 208) set(ax,... Error in axis (line 94) LocSetLimits(ax(j),cur_arg); Error in rejectvisual_summary>redraw (line 239) abc = axis; axis([abc(1:2) 1 info.nchan]); Error in rejectvisual_summary (line 126) redraw(h); Error in ft_rejectvisual (line 306) [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); ---------- to reproduce you can simply take any preprocessed structure, pass it through ft_preprocessing with cfg.channel=1 to get a preprocessed single-channel structure.


Robert Oostenveld - 2012-05-13 13:49:36 +0200

I have just added a test file with raw data (one channel, 15 trials). Please base your test script on this. roboos@mentat001> cd matlab/fieldtrip/test/ roboos@mentat001> svn add bug1474.mat A (bin) bug1474.mat roboos@mentat001> svn commit Adding (bin) test/bug1474.mat Transmitting file data . Committed revision 5773. roboos@mentat001>


Eelke Spaak - 2012-05-21 13:37:00 +0200

Should be fixed now. I actually consider it more a Matlab bug, by the way. Apparently, axis limits can not be constant (i.e. ylim([1 1]) is invalid). This would seem perfectly valid to me, but anyway, I added a workaround in the FT code :) bash-3.2$ svn commit private/rejectvisual_summary.m test/test_bug1474.mat test/test_bug1474.m test/bug1474.mat Sending private/rejectvisual_summary.m Deleting test/bug1474.mat Adding test/test_bug1474.m Adding (bin) test/test_bug1474.mat Transmitting file data .. Committed revision 5790.


Eelke Spaak - 2012-08-23 10:35:15 +0200

closing my bugs


Boris Reuderink - 2012-10-09 12:08:01 +0200

The test script for this bug does never complete, since it requires manual input. Can it be changed such that it can be run without user intervention?


Robert Oostenveld - 2012-10-10 19:41:02 +0200

(In reply to comment #4) Don't think so. I suggest just to add "return" to the start of the script. This way the code remains available for future reference, but does not cause a false positive in the automated test runs.


Eelke Spaak - 2012-10-24 09:54:08 +0200

added return statement to test script, as suggested.


Eelke Spaak - 2014-01-29 13:28:45 +0100

changing lots of bugs from resolved to closed.


Teresa Madsen - 2016-01-06 20:42:17 +0100

Eliminating all but one channel still results in an error for me: Error using matlab.graphics.axis.Axes/set While setting the 'XLim' property of Axes: Value must be a 1x2 vector of numeric type in which the second element is larger than the first and may be Inf Error in axis>LocSetLimits (line 200) set(ax,... Error in axis (line 93) LocSetLimits(ax(j),cur_arg); Error in rejectvisual_summary>redraw (line 279) axis([xmin xmax 0.5 ymax+0.5]); % have to use 0 as lower limit because ylim([1 1]) (i.e. the single-channel case) is invalid Error in rejectvisual_summary (line 133) redraw(h); Error in ft_rejectvisual (line 275) [chansel, trlsel, cfg] = rejectvisual_summary(cfg, tmpdata); I see the comment there about ylim, but the problem is actually caused by xmin == xmax. I've changed my local code to xmin-0.5 xmax+0.5, just as I did for the single trial error (http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3005).