Back to the main page.
Bug 2444 - ft_selectdata_new fails on component data
Status | CLOSED FIXED |
Reported | 2014-01-20 14:35:00 +0100 |
Modified | 2014-03-06 15:37:21 +0100 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 normal |
Assigned to: | Jan-Mathijs Schoffelen |
URL: | |
Tags: | |
Depends on: | |
Blocks: | 1021 |
See also: |
Eelke Spaak - 2014-01-20 14:35:20 +0100
When doing the following: cfg = []; cfg.latency = [0 1]; dat = ft_selectdata(cfg, comp); I get this: Undefined function or variable "dimord". Error in ft_selectdata_new (line 128) dimtok = tokenize(dimord, '_'); Error in ft_selectdata (line 51) [varargout{1:nargout}] = ft_selectdata_new(varargin{:}); It seems that the function tries to treat the data as timelock/freq (which have a dimord), rather than comp (which is like raw). Will make test script after filing the bug.
Eelke Spaak - 2014-01-20 14:40:11 +0100
bash-4.1$ svn commit test_bug2444.m Adding test_bug2444.m Transmitting file data . Committed revision 9112. For convenience, this is in the test script: %% make some data comp = []; comp.label = {'comp1', 'comp2'}; comp.topolabel = {'chan1', 'chan2'}; comp.time = {1:1000, 1:1000}; comp.trial = {randn(2,1000), randn(2,1000)}; comp.topo = eye(2); comp.unmixing = eye(2); %% select some data cfg = []; cfg.latency = [10 20]; selected = ft_selectdata(cfg, comp);
Eelke Spaak - 2014-01-20 14:42:25 +0100
FWIW, ft_selectdata_old seems to work fine on component data.
Jan-Mathijs Schoffelen - 2014-01-21 09:41:05 +0100
Hi Eelke, Also check out test_ft_selectdata. It's an extensive test script that aims (eventually) at testing all user scenarios. Did not incorporate 'comp' data yet.