Back to the main page.

Bug 3353 - using ft_sourceparcellate fails for max, min and maxabs methods fail if a tissue in the atlas is not found in the source,

Reported 2017-09-22 12:56:00 +0200
Modified 2018-01-26 09:50:49 +0100
Product: FieldTrip
Component: inverse
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P5 minor
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Lau Møller Andersen - 2017-09-22 12:56:28 +0200

Created attachment 848 Script for reproducing the bug Included is also a bug related to ft_sourceparcellate regarding a numerical inaccuracy problem

Jan-Mathijs Schoffelen - 2017-11-09 17:49:29 +0100

I came across this too last week (didn't know there was already a bug filed about it). The first issue has been fixed by now. I'll look into the second one.

Lau Møller Andersen - 2017-11-13 09:41:13 +0100


Jan-Mathijs Schoffelen - 2017-11-22 09:54:58 +0100

OK, confirmed. I converted Lau's code into a test function. The numerical difference in the positions is on the order of 10^-13 (taking the sqrt, as compared to Lau's reported numbers) I propose to be a bit more lenient in the comparison of the source positions with the parcellation positions by replacing isequaln with isalmostequal. This requires isalmostequal to be present in fieldtrip/private (rather than only in fieldtrip/test/private), and thus an addition to as well.

Jan-Mathijs Schoffelen - 2017-11-22 10:06:10 +0100

This should now be fixed with PR 589 on github.