Back to the main page.

Bug 1099 - fixdipole should be done in ft_checkconfig instead of main FT functions

Status ASSIGNED
Reported 2011-11-02 09:50:00 +0100
Modified 2012-01-19 10:08:28 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: All
Operating System: All
Importance: P2 enhancement
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2011-11-02 09:50:53 +0100

I notice in ft_dipolesimulation the following cfg.dip = fixdipole(cfg.dip); that is similar to the fixsens that we had in many functions. Instead of fixing the problem at many separate locations, we should aim for ft_checkconfig doing all of this. So all three occurences manzana> grep fixdipole *.m ft_dipolefitting.m: dip = fixdipole(dip); ft_dipolefitting.m: dip(t) = fixdipole(dip(t)); ft_dipolesimulation.m:cfg.dip = fixdipole(cfg.dip); should be dealt with using ft_checkconfig. If this assignment is unclear, please ask Robert what to do!!!


Boris Reuderink - 2011-11-17 10:46:52 +0100

Changed the status of bugs without a specific owner to UNCONFIRMED. I'll try to replicate these bugs (potentially involving the submitter), and change confirmed bugs to NEW. Boris


Boris Reuderink - 2011-11-17 14:05:55 +0100

*** Bug 1131 has been marked as a duplicate of this bug. ***


Jan-Mathijs Schoffelen - 2012-01-19 09:51:59 +0100

probably it should not be ft_checkconfig where the stuff is done, but ft_checkdata. i.e. ft_datatype_dip should be called from within ft_checkdata, and withing ft_datatype_dip the fixdipole functionality should be implemented.


Jan-Mathijs Schoffelen - 2012-01-19 10:01:55 +0100

ft_datatype classifies a data structure as a 'dip' when isfield(data, 'dip'), i.e. it seems that it looks for the output of ft_dipolefitting. fixdipole operates on a 'low-level' dip-structure. How shall we make this consistent?


Robert Oostenveld - 2012-01-19 10:08:28 +0100

(In reply to comment #4) it is indeed a bit unclear as to when a dip is a cfg.dip or a data.dip. In either case an inconsistent representation is possible. [pos, ori] = fixdipole(pos, ori) should ensure that pos=Nx3 and mom=3xN. But there are also cases where time has to be represented both, and then [pos, mom] = fixdipole(pos, mom) should probably ensure that pos=Nx3 and mom=(3*N)xT