Back to the main page.

Bug 1597 - ft_selectdata_new not work with toilim

Status CLOSED FIXED
Reported 2012-07-05 13:07:00 +0200
Modified 2012-08-22 17:31:25 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Johanna
URL:
Tags:
Depends on:
Blocks:
See also:

Johanna - 2012-07-05 13:07:39 +0200

tl = avg: [149x900 double] var: [149x900 double] time: [1x900 double] dof: [149x900 double] label: {149x1 cell} trial: [77x149x900 double] dimord: 'rpt_chan_time' cov: [77x149x149 double] grad: [1x1 struct] trialinfo: [77x1 double] cfg: [1x1 struct] cfg=[]; cfg.toilim=[1 3]; % tl.time(1)=-1 and tl.time(end)=1.9967 tln=ft_selectdata_new(cfg,tl); tln = time: [1x900 double] label: {149x1 cell} trial: [77x149x900 double] dimord: 'rpt_chan_time' cfg: [1x1 struct] % in otherwords, .time and .trial not updated. % This is due to 'seltim' remaining NaN after line 175, and then makeselection is never called.


Johanna - 2012-07-05 15:30:55 +0200

note, cfg.latency does work as expected. Is there an intended difference between cfg.toilim and cfg.latency, or should one of them be deprecated/ error given?


Johanna - 2012-07-05 15:30:55 +0200

note, cfg.latency does work as expected. Is there an intended difference between cfg.toilim and cfg.latency, or should one of them be deprecated/ error given?


Jan-Mathijs Schoffelen - 2012-07-09 11:01:53 +0200

I guess that eventually it should be called latency, although in the old selectdata the option is still known as toilim. Would an ft_checkconfig(cfg, 'renamed', {'toilim' 'latency'}) at the beginning of ft_selectdata_new do the trick? If so, could you add this, commit it and close the bug?


Johanna - 2012-07-11 11:05:01 +0200

yes, that checkconfig works to solve it. svn commit 6258.