Back to the main page.

Bug 1088 - ft_volumelookup behaves inconsistently w.r.t. the handling of the cfg options

Status CLOSED FIXED
Reported 2011-10-28 16:31:00 +0200
Modified 2012-06-12 13:03:13 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: All
Operating System: All
Importance: P4 enhancement
Assigned to: Cristiano Micheli
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2011-10-28 16:31:48 +0200

whereas most FT functions start with setting the defaults and having empty [] values where no default can be specified, this function has isfield(cfg, 'xxx') all over the place. The behaviour of the function subsequently also depends on the presence of the fields and not on the values in the fields. That is inconsistent and should be changed. I suggest the following 1) make a test script to figure out all the functionality 2) change the actual code of the function, ensuring that the test script continues to work


Boris Reuderink - 2011-11-17 10:46:36 +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


Cristiano Micheli - 2012-02-01 16:24:58 +0100

(In reply to comment #1) i added the instructions like cfg.field1 = ft_getopt(cfg,'field2'); ... cfg.fieldN = ft_getopt(cfg,'fieldN'); at the beginning. This should ensure the fields are filled with an empty value if they are not provided in input.


Boris Reuderink - 2012-02-02 11:53:04 +0100

Resolved in SVN revision 5215.