Back to the main page.

Bug 921 - selecting freq parameter fails in ft_selectdata

Reported 2011-09-01 20:22:00 +0200
Modified 2013-10-26 18:15:56 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 major
Assigned to: Robert Oostenveld
Depends on:
Blocks: 1021
See also:

Robert Oostenveld - 2011-09-01 20:22:15 +0200

see at the end of the test script for bug798 and the code snippet below argin{1} = ft_checkdata(t2_subj1, 'datatype', 'freq'); argin{2} = ft_checkdata(t2_subj1_null, 'datatype', 'freq'); argin{3} = ft_checkdata(t2_subj2, 'datatype', 'freq'); argin{4} = ft_checkdata(t2_subj2_null, 'datatype', 'freq'); % and data = ft_selectdata(argin{:}, 'param', 'powspctrm'); % after which the prob and stat are not removed, and dimord not updated assert(strcmp(data.dimord, 'rpt_chan_freq')); % FIXME the following tests fail, see bug % assert(~isfield(data, 'stat')); % assert(~isfield(data, 'prob')); >> data data = stat: [274x1 double] df: 241 critval: [-1.9699 1.9699] prob: [274x1 double] mask: [274x1 logical] dimord: 'rpt_chan_freq' label: {274x1 cell} cfg: [1x1 struct] powspctrm: [4x274 double] freq: 0

Robert Oostenveld - 2012-01-20 10:07:27 +0100

I created a test script based on the data from bug 798 and the initial comment. With the test script and the initial comment I am not able to reproduce the bug. The output of ft_selectdata is correct, although it is a bit unusual that it does not contain an output cfg. But then, I suspect that to be consistent with the ft_selectdata_old implementation. data = powspctrm: [4x274 double] label: {274x1 cell} freq: 0 dimord: 'rpt_chan_freq' I have committed the test script, and also updated test_bug798. manzana> svn commit Sending test/test_bug798.m Adding test/test_bug921.m Transmitting file data .. Committed revision 5153.