Back to the main page.
Bug 2659 - Failure of ft_timelockgrandaverage with keeptrials=1 timelock data
| Status | CLOSED DUPLICATE |
| Reported | 2014-07-21 16:09:00 +0200 |
| Modified | 2019-08-10 12:28:40 +0200 |
| Product: | FieldTrip |
| Component: | core |
| Version: | unspecified |
| Hardware: | Macintosh |
| Operating System: | Mac OS |
| Importance: | P5 normal |
| Assigned to: | |
| URL: | |
| Tags: | |
| Depends on: | |
| Blocks: | |
| See also: |
Ian Andolina - 2014-07-21 16:09:24 +0200
I have the following timelock structure, generated with cfg.keeptrials = 'yes': avg: [1x1601 double] var: [1x1601 double] time: [1x1601 double] dof: [1x1601 double] label: {'TETFP10'} trial: [65x1x1601 double] dimord: 'rpt_chan_time' cov: [65x1 double] trialinfo: [65x1 double] cfg: [1x1 struct] Note the dimord for 'avg' is 'chan_time' but for 'trial' it is 'rpt_chan_time'. When I pass these timelocks structures into ft_timelockgrandaverage (cfg.method='across') then I get the following error: Index exceeds matrix dimensions. Error in ft_timelockgrandaverage (line 167) varargin{i}.(cfg.parameter) = varargin{i}.(cfg.parameter)(:,chansel,timesel); The problems is of course that ft_timelockgrandaverage looks at the dimord field which is only valid for 'trials' but the parameter being averaged is 'avg'. ft_timelockgrandaverage shouldn't be relying on the dimord field I think...
Ian Andolina - 2014-07-22 12:30:38 +0200
OK, I think the comment in this related bug probably answers this bug too, that this is a known weakness of having only 1 dimord field and this will be a high-impact change to fix properly and you don't want to do this with a smaller hack to change dimord to take into account the cfg.parameter field? http://bugzilla.fcdonders.nl/show_bug.cgi?id=2372#c2
Jan-Mathijs Schoffelen - 2014-07-22 14:27:01 +0200
marked as duplicate *** This bug has been marked as a duplicate of bug 2372 ***