Back to the main page.

Bug 2350 - ensure that geometrical units are dealt with consistently for all headmodels

Status ASSIGNED
Reported 2013-10-30 17:44:00 +0100
Modified 2015-02-11 10:43:15 +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 - 2013-10-30 17:44:57 +0100

in ft_headmodel_singlesphere it presently reads if ~isempty(unit) vol.unit = unit; % use the user-specified units for the output else geometry = ft_convert_units(geometry); % ensure that it has units, estimate them if needed vol.unit = geometry.unit; % copy the geometrical units into the volume conductor end whereas all other ft_headmodel_xxx functions there is no such on-the-fly conversion. This should be made consistent and moved to ft_prepare_headmodel.


Robert Oostenveld - 2013-10-30 17:46:38 +0100

furthermore, all ft_headmodel_xxx functions should be changed such that they can safely expect the input to be in SI units, i.e. in meter. Perhaps add something like if ~strcmp(geometry.unit, 'm') error('this function requires SI units') end


Robert Oostenveld - 2013-10-30 17:48:47 +0100

in fieldtrip main functions you can still change units around, as soon as you use a function from fieldtrip/forward (like ft_compute_leadfield, or ft_headmodel_xxx), it should be in SI units. Since ft_prepare_headmodel calls ft_headmodel_xxx, ft_prepare_headmodel MUST convert to SI units.