Back to the main page.

Bug 1584 - singleshell nolte options should be specified in the vol structure, not in a cfg field

Status ASSIGNED
Reported 2012-07-02 23:15:00 +0200
Modified 2013-01-23 13:07:34 +0100
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2012-07-02 23:15:39 +0200

fieldtrip/private/prepare_headmodel.m contains the following lines of code if ~isfield(cfg, 'order'), cfg.order = 10; end % order of expansion for Nolte method; % 10 should be enough for real applications; % in simulations it makes sense to go higher It is nice for this to be configurable, but it should be done by ft_prepare_heademodel (which should have an order option in case method=singleshell) and further down by ft_headmodel_singleshell.


Johanna - 2013-01-15 11:50:28 +0100

Hi Lilla, I found this bug, as I'm testing test_ft_prepare_singleshell and trying to understand the differences of the old and new ways of headmodels. I'm not sure I understand this bug, or where this cfg.order is used? I don't see it used in either ft_headmodel_singleshell or the old ft_prepare_singleshell.


Lilla Magyari - 2013-01-15 13:25:36 +0100

hi Johanna, I do not know what "order" exactly does, but it is used in ft_prepare_vol_sens in line 292. But this can be set only when the leadfield is calculated (because the actual algorithm for the singleshell runs during preparation of the leadfield). cfg.order seems to be a not-documented but already existing cfg option for ft_prepare_leadfield. Ft_prepare_leadfield is calling prepare_headmodel which is calling ft_prepare_vol_sens. If order should be done already at the ft_prepare_headmodel, then it means (I think) that the vol should contain not only .bnd .method = 'singleshell' but also: .order field and then ft_prepare_leadfield should get this info from vol.order and pass it further to prepare_headmodel... etc. Does this answer your question? I can do this change, if it is agreed that this should be done. Lilla


Johanna - 2013-01-15 14:49:34 +0100

thanks, clear to me now. Feel free to make the change to the new ft_prepare_headmodel. (so long as Robert doesn't disagree).