Back to the main page.

Bug 1450 - subfields in ft_default are not added to input cfg by ft_checkconfig

Status CLOSED FIXED
Reported 2012-05-01 21:51:00 +0200
Modified 2012-08-23 10:33:51 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P4 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2012-05-01 21:51:09 +0200

One of the responsibilities of ft_checkconfig is to add the global defaults from the global ft_default variable to the user's input cfg. All fields present in the ft_default structure that are missing in the user's cfg should be merged.


Robert Oostenveld - 2012-05-01 22:05:26 +0200

I created a test script that demonstrates the problem. mbp> svn commit test_bug1450.m Adding test_bug1450.m Transmitting file data . Committed revision 5720.


Robert Oostenveld - 2012-05-02 23:03:03 +0200

note to self: there is the fieldtrip/private/mergeconfig function which serves this purpose. It also does not deal with nested structs.


Robert Oostenveld - 2012-05-02 23:27:32 +0200

I have improved mergeconfig.m such that it also deals with substructures. The test_bug1450 script now runs properly. mbp> svn commit utilities/ Sending utilities/ft_checkconfig.m Sending utilities/private/mergeconfig.m Transmitting file data .. Committed revision 5729. mbp> svn update U private/mergeconfig.m Updated to revision 5730.


Robert Oostenveld - 2012-08-23 10:33:51 +0200

closed multiple bugs that have been resolved for some time