Back to the main page.

Bug 1426 - the openmeeg volume conduction model fails in some test scripts

Status CLOSED FIXED
Reported 2012-04-15 13:03:00 +0200
Modified 2012-06-12 12:59:03 +0200
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 critical
Assigned to: Cristiano Micheli
URL:
Tags:
Depends on:
Blocks: 701042
See also:

Robert Oostenveld - 2012-04-15 13:03:27 +0200

See http://bugzilla.fcdonders.nl/show_bug.cgi?id=1414 This pertains to the test scripts that were made for bug #70 and bug #1042. The scripts have worked in the past, and should now again work without actually changing the test scripts. It seems that the underlying code has broken.


Robert Oostenveld - 2012-04-19 18:02:11 +0200

also the test scripts that are in fieldtrip/external/openeeg fail according to Alexandre.


Cristiano Micheli - 2012-04-26 11:20:44 +0200

(In reply to comment #1) The test for bug 1042 runs smoothly for me. Test for bug 70 has an assert failing. All asserts from line 527 should fail because the the output of ft_prepare_leadfield is not a leadfield itself and contains different cfg.callinfo structures. The assert on line 530 fails because of slight numerical differences in the leadfields of lf and lf3, i'm looking into why this happens. ALex's scripts fail because we do not support xunit toolbox (it contains assertAlmostEqual... kind of functions, base on an OOP package). Shall we add it to FT? Cristiano


Alexandre Gramfort - 2012-04-26 16:13:52 +0200

see my comments in bug #1441 http://bugzilla.fcdonders.nl/show_bug.cgi?id=1441 Alex


Cristiano Micheli - 2012-04-26 20:44:43 +0200

(In reply to comment #3) Changed the asserts... of xunit into assert(norm(x-y<thr))) statements using the matlab function 'assert'. Also added the capital TEST comment in order to make the test file compatible with the FieldTrip automatic test engine


Alexandre Gramfort - 2012-04-26 22:00:54 +0200

I've just pushed a tiny bug fix thanks for taking care of this ALex


Robert Oostenveld - 2012-04-26 23:24:08 +0200

Let me add a general comment: we are using xunit ourselves for the regression testing. But we so far have not called it from within the test scripts, but rather the other way around. I suggest to add xunit to ft_hastoolbox and install a copy in /home/common/matlab. By calling ft_hastoolbox('xunit', 1), that copy will then automatically be added to the path. The call to ft_hastoolbox could then be included in any script that wants to use it. The assertAlmostEqual is also interesting for some other bugs.


Alexandre Gramfort - 2012-04-27 08:49:58 +0200

I would not add a dependency on xunit unless all tests use it. The benefit is not to have an assertAlmostEqual function that you could easily write yourself but to be able to run all tests with one command and get a summary of which tests passed and which failed. If you don't want the summary, then just write an assertAlmostEqual.m function without the dependency. Ideally every user should be able to run the tests to make sure its install is correct. Alex