Back to the main page.

Bug 417 - ft_prepare_sens_vol does not work for EEG

Status CLOSED DUPLICATE
Reported 2011-01-19 15:30:00 +0100
Modified 2011-01-26 15:38:34 +0100
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Lilla Magyari - 2011-01-19 15:30:16 +0100

Hi, I used a script for computing the leadfield in the 16.01.2011 version of leadfield, but I got an error message, while the same script runs with earlier version of fieldtrip (for example, 18.12.2010). cfg = []; cfg.elec = elec_new; cfg.vol = vol; cfg.reducerank = 3; cfg.channel = {'all', '-RM'}; cfg.grid.resolution = 6; cfg.inwardshift = -1.5; cfg.xgrid = 'auto'; cfg.ygrid = 'auto'; cfg.zgrid = 'auto'; [grid] = ft_prepare_leadfield(cfg);


Lilla Magyari - 2011-01-19 15:34:19 +0100

Created attachment 18 this is the elec structure and i used the standard vol


Lilla Magyari - 2011-01-19 15:35:40 +0100

>> cfg = []; %cfg.elec = elec; cfg.elec = elec_new; cfg.vol = vol; cfg.reducerank = 3; %this is the default anyway for EEG cfg.channel = {'all', '-RM'}; cfg.grid.resolution = 6; %the resolution of the grid, voxel size cfg.inwardshift=-1.5; %expand the grid, because the grid size is smaller than the real head cfg.xgrid='auto'; cfg.ygrid='auto'; cfg.zgrid='auto'; %[grid6] = ft_prepare_leadfield(cfg); [grid7] = ft_prepare_leadfield(cfg); using headmodel specified in the configuration using electrodes specified in the configuration ??? Reference to non-existent field 'tra'. Error in ==> ft_prepare_vol_sens at 288 Nchans = size(sens.tra,1); Error in ==> prepare_headmodel at 114 [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ==> ft_prepare_leadfield at 145 [vol, sens, cfg] = prepare_headmodel(cfg, data);


Lilla Magyari - 2011-01-20 12:49:37 +0100

I looked into the code: At this part of the code, sens.tra has not been defined for EEG because it has been defined only for MEG before (at elseif ismeg): elseif ismeg sens_orig = sens; if ~isfield(sens, 'tra'); Nchans = length(sens.label); Ncoils = size(sens.pnt,1); if Nchans~=Ncoils error('inconsistent number of channels and coils'); end sens.tra = sparse(eye(Nchans, Ncoils)); end ... elseif iseeg % select the desired channels from the electrode array % order them according to the users specification Nchans = size(sens.tra,1); Ncontacts = size(sens.tra,2);


Robert Oostenveld - 2011-01-20 13:40:46 +0100

this has been fixed this morning (also because of bug 408) *** This bug has been marked as a duplicate of bug 408 ***


Robert Oostenveld - 2011-01-26 15:37:14 +0100

I closed all bugs that were resolved prior and including 2011-01-25. All resolved bugs should have been discussed by now, therefore we don't want to see them again in the next meeting. Instead, in the next meeting we want to see the recent improvements and fixes.


Robert Oostenveld - 2011-01-26 15:38:34 +0100

I closed all bugs that were resolved prior and including 2011-01-25. All resolved bugs should have been discussed by now, therefore we don't want to see them again in the next meeting. Instead, in the next meeting we want to see the recent improvements and fixes.