Back to the main page.

Bug 1780 - prepare_singleshell to ft_prepare_singleshell?

Reported 2012-10-14 20:30:00 +0200
Modified 2019-08-10 11:56:21 +0200
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to:
Depends on:
See also:

Lilla Magyari - 2012-10-14 20:30:21 +0200

ft_prepare_headmodel (line 203) is calling a function prepare_singleshell (when you run the test_tutorial_beamformer). The output on the screen is different that what I would expect given the input (e.g. there is no message about thresholding, only there is message about smoothing. But by default smoothing and also thresholding should be done by calling volumesmooth and volumethreshold). When I correct the call of prepare_singleshell to ft_prepare_singleshell, the output on the screen is the expected (I see a message also about thresholding). Regarding that prepare_singleshell is a compatibility wrapper that points to ft_prepare_singleshell, it gives me a headache to figure what's happening. Is it possible that the input for the function is passed over in a different way to ft_prepare_singlehell compared to as it would be called directly? Anyway, I think the best is to correct prepare_singleshell to ft_prepare_singleshell, and figure out the rest later. Lilla

Robert Oostenveld - 2012-10-14 21:00:14 +0200

Inside the ft_prepare_headmodel there are a few methods that need a single triangulated brain surface, especially for MEG. These call the prepare_singleshell method that is implemented as subfunction in ft_prepare_headmodel, see line 481. It should indeed not be confused with compat/prepare_singleshell, which is the compat version for ft_prepare_singleshell. I believe that the present implementation is correct, and it should not be ft prefixed. compat/prepare_singleshell should never be used any more. It is also not used here. ft_prepare_singleshell should according to our own documentation also not be used any more (but instead people should switch over to ft_prepare_headmodel), although people are for now still allowed to use it in their scripts. Johanna (CC) is working on a new version of ft_prepare_headmodel that will hopefully clarify all these issues.

Robert Oostenveld - 2012-10-14 21:01:11 +0200

I mark this one as invalid, because I believe there is no problem with the code (except that it is truly confusing, which will be fixed).

Robert Oostenveld - 2012-10-14 21:15:07 +0200

I have just updated the documentation. For each of the old functions there is now something like this and a warning. >> help ft_prepare_concentricspheres ft_prepare_concentricspheres is deprecated, please use FT_PREPARE_HEADMODEL and FT_PREPARE_MESH See also ft_prepare_headmodel mbp> svn commit ft_prep* Sending ft_prepare_bemmodel.m Sending ft_prepare_concentricspheres.m Sending ft_prepare_headmodel.m Sending ft_prepare_localspheres.m Sending ft_prepare_singleshell.m Transmitting file data ..... Committed revision 6754.

Robert Oostenveld - 2019-08-10 11:56:21 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on