Back to the main page.

Bug 2205 - consistent documentation/implementation in ft_dipolefitting

Status ASSIGNED
Reported 2013-06-21 09:45:00 +0200
Modified 2015-02-11 10:43:33 +0100
Product: FieldTrip
Component: inverse
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-06-21 09:45:32 +0200

Copied from the email discussion list: Okay, I got this sorted out. I was able to use ft_prepare_sourcemodel to set up the config variable. The header info of ft_dipolefitting should get updated though. Cheers! Joe On Jun 19, 2013, at 8:35 PM, Joseph Dien wrote: > Hi, > it looks like changes have been made to ft_dipolefitting that have resulted in the following options no longer working: > > cfg.grid.xgrid = 'auto'; > cfg.grid.ygrid = 'auto'; > cfg.grid.zgrid = 'auto'; > > The header of the ft_dipolefitting file as of the 20130619 release says: > > % This function depends on FT_PREPARE_DIPOLE_GRID which has the following options: > % cfg.grid.xgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.xgrid = 'auto'), documented > % cfg.grid.ygrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.ygrid = 'auto'), documented > % cfg.grid.zgrid (default set in FT_PREPARE_DIPOLE_GRID: cfg.grid.zgrid = 'auto'), documented > > but a Find Files search indicates that FT_PREPARE_DIPOLE_GRID no longer exists. > > I don't have copies of FieldTrip older than Feb 2013 so I can't check directly but I know that my function call used to work and no longer does. > > Can someone help me find a fix for this? > > Any help appreciated! > Joe


Robert Oostenveld - 2013-06-21 10:07:13 +0200

FYI the hidden documentation sections with % This function depends on XXX which has the following options were added quite some time back by Ingrid and Saskia in an effort to increase the coverage of the main reference documentation. Since then, they have not been carefully maintained, so probably it is better to remove them (and/or recreate them where needed).


Robert Oostenveld - 2013-11-15 18:46:11 +0100

Note to self: here is a piece of test code that I had started on. ----- nchan = 20; ntime = 40; pos = randn(nchan,3); pos = 10*bsxfun(@rdivide, pos, sqrt(sum(pos.^2,2))); lab = arrayfun(@num2str, 1:nchan, 'UniformOutput', false); timelock = []; timelock.avg = randn(nchan,ntime); timelock.time = 1:ntime; timelock.label = lab; timelock.dimord = 'chan_time'; cfg = []; cfg.vol.c = 1; cfg.vol.r = 10; cfg.vol.o = [0 0 0]; cfg.vol.units = 'cm'; cfg.elec.elecpos = pos; cfg.elec.label = lab; % use default options dip1 = ft_dipolefitting(cfg, timelock); cfg.grid.xgrid = -10:1:10; cfg.grid.ygrid = -10:1:10; cfg.grid.zgrid = -10:1:10; dip2 = ft_dipolefitting(cfg, timelock);