[FieldTrip] Error in DICS Source Localization (Beamformer)

Helen L. Wieffering hwieffer at bowdoin.edu
Mon Jul 20 22:28:45 CEST 2015


Hi again,

On another run through my analysis I've realized that the below problem likely stems from the fact that I haven't yet computed the leadfield. (I was avoiding this step as I was getting errors there too). If anyone has insight on the message below, please chime in:

cfg = [];
elec = ft_read_sens('GSN-HydroCel-129.sfp');
cfg.elec = elec;
cfg.channel = 'all';
cfg.vol = vol;
cfg.grid.resolution = 1;   % use a 3-D grid with a 1 cm resolution
cfg.grid.unit = 'mm';
[grid] = ft_prepare_leadfield(cfg, freqCR);
using headmodel specified in the configuration
using electrodes specified in the configuration
converting units from 'cm' to 'mm'
determining source compartment (1)
projecting electrodes on skin surface
combining electrode transfer and system matrix
creating dipole grid based on automatic 3D grid with specified resolution
using headmodel specified in the configuration
using gradiometers specified in the configuration
creating dipole grid with 1 mm resolution
0 dipoles inside, 0 dipoles outside brain
making tight grid
Error using  ==
Matrix dimensions must agree.

Error in ft_prepare_sourcemodel (line 666)
  xmin_indx = find(grid.xgrid==xmin);

Error in ft_prepare_leadfield (line 159)
grid = ft_prepare_sourcemodel(tmpcfg);

Thanks again, and sorry for flooding your inbox.

Helen
________________________________
From: Helen L. Wieffering
Sent: Monday, July 20, 2015 3:52 PM
To: fieldtrip at science.ru.nl
Subject: Error in DICS Source Localization (Beamformer)

Dear Fieldtrip Users,

In attempting to use Beamformer source localization, I get an error when computing ft_sourceanalysis with the code below:

cfg = [];
cfg.method = 'dics';
cfg.frequency = 6;
cfg.elecfile = 'GSN_HydroCel_129_short.sfp';
cfg.vol = vol;
cfg.dics.projectnoise = 'yes';
cfg.dics.lambda = '5%';
cfg.dics.keepfilter = 'yes';
cfg.dics.realfilter = 'yes';
sourceAll = ft_sourceanalysis(cfg, freqAll);

the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB
using headmodel specified in the configuration
reading electrodes from file 'GSN_HydroCel_129_short.sfp'
converting units from 'cm' to 'mm'
determining source compartment (1)
projecting electrodes on skin surface
combining electrode transfer and system matrix
creating dipole grid based on inward-shifted brain surface from volume conductor model
using headmodel specified in the configuration
using gradiometers specified in the configuration
642 dipoles inside, 0 dipoles outside brain
the call to "ft_prepare_sourcemodel" took 0 seconds and required the additional allocation of an estimated 42 MB
selection crsspctrm along dimension 3

Attempted to access noise(0); index must be a positive integer or logical.

Error in beamformer_dics (line 211)
    noise = noise(end);

Error in ft_sourceanalysis (line 662)
          dip(i) = beamformer_dics(grid, sens, vol, [],  squeeze(Cf(i,:,:)), optarg{:});


I note that it runs without errors when I change cfg.dics.projectnoise to 'no' - but what implications does that bring? I find with that change I can make it through the rest of the Beamformer tutorial (the section on contrasting conditions) without explicit errors, but I nevertheless receive the following messages, following which my plotted figure is simply blank! Something is going wrong, I think.

(1)
sourceDiffInt = ft_sourceinterpolate(cfg, sourceDiff, mri);
Warning: use cfg.parameter='pow' instead of cfg.parameter='avg.pow'
> In ft_checkconfig (line 139)
  In ft_sourceinterpolate (line 119)

(2)
ft_sourceplot(cfg, sourceDiffInt);
Warning: use cfg.funparameter='pow' instead of cfg.funparameter='avg.pow'
> In ft_checkconfig (line 139)
  In ft_sourceplot (line 210)
Warning: use cfg.maskparameter='pow' instead of cfg.maskparameter='avg.pow'
> In ft_checkconfig (line 139)
  In ft_sourceplot (line 213)
the input is segmented volume data with dimensions [128 128 128]
not plotting anatomy
Warning: could not determine dimord of "pow" in the following data
> In getdimord (line 516)
  In ft_sourceplot (line 390)

Anyone know what might be the problem? Thanks very much!

Helen Wieffering
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150720/0ed5176b/attachment-0002.html>


More information about the fieldtrip mailing list