Back to the main page.

Bug 1596 - ft_selectdata_old with toilim not work on timelock data .avg and .cov correcltly

Status CLOSED FIXED
Reported 2012-07-05 12:10:00 +0200
Modified 2013-01-16 15:04:09 +0100
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 12:10:57 +0200

if keep trials are yes, then the .trial and .time fields are updated correctly with new toilim request, but the .avg still had old time axis, and the .cov should be removed since it was based on a different time window than present in the new data structure.


Johanna - 2012-07-05 13:06:46 +0200

This is more complicated that I initially thought... 1) Either ft_selectdata_old can do the work after the call to seloverdim(data,'time',seltoi,fb), and then remove .cov and .var, and recompute .avg based on the new .trial, (In prinicple .cov and .var could be recomputed based on the new .trial, but in the case of .var, this is a problem of not having the 'dof' information. Is data.var=var(data.trial,[],1) sufficient? As for recomputing .cov, the data.cfg.removemean flag would need to be used.) 2) Or seloverdim modified so it finds any param with time dimension, not just those fields matching .dimord. (or in line with discussions previously, check also for fields with .XXXdimord such as .avgdimord and find and modify those as well. Note: keepfields subfunction within ft_selectdata_new does correctly remove unnecessary fields.


Johanna - 2012-09-25 17:46:24 +0200

'wontfix' since ft_selectdata_new does the job correctly.


Johanna - 2012-09-26 10:43:02 +0200

actually, the user should still be warned this is happening and told to use ft_selectdata_new. Thus, warning added to ft_selectdata_old. svn r6543 commited.