[FieldTrip] A datatype error in ft_sourceanalysis (Reference to non-existent field 'topo')

Roey Schurr roeysc at gmail.com
Wed Jul 30 22:24:53 CEST 2014


Dear fieldtrippers,

I'm writing you regarding an error  I encountered upon computing an inverse
solution in mne method:

Reference to non-existent field 'topo'.

Error in ft_datatype_comp (line 92)
      if size(comp.topo,1)==size(comp.topo,2)

Error in ft_checkdata (line 342)
      data = ft_datatype_comp(data);

Error in ft_sourceanalysis (line 161)
data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'},
'feedback',
'yes');

The problem stems from a change (made in 2014-05-27) in
"ft_sourceanalysis", and can be bypassed by changing the order of data
types in line 161 of "ft_sourceanalysis":

instead of
    data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'},
'feedback', 'yes');
write
    data = ft_checkdata(data, 'datatype', {*'timelock', 'freq', 'comp'*},
'feedback', 'yes');

Now, I am sure there was a good reason for making this change, so I am
guessing the fault is mine in the way I try computing the inverse solution
(which did work until this change of ft_sourceanalysis). The relevant piece
of code is:

cfg = struct;
cfg.method = 'mne';
cfg.elec = elec;
cfg.grid = gridVar;
cfg.vol = vol;
cfg.rawtrial = 'yes';
cfg.hdmfile = headModelPath;
cfg.mne.lambda = '5%';
cfg.keepfilter = 'yes';
cfg.rawtrial = 'no';
cfg.singletrial = 'no';
cfg.keeptrials = 'yes';
source = ft_sourceanalysis(cfg, data)

I am also not sure why the data is thought to be a "comp" data. A possible
cause for the problem is that the raw EEG records I work with are in TRC
format which has to be transformed into a fieldtrip compatible format. So
the "data" struct in the code has the following fields:

data =
   label: {1x19 cell}
   fsample: 256
   trial: {1x12 cell}
   time: {1x12 cell}
   interpolatedElectrodes: {1x12 cell}

Any ideas regarding the suggested bypass or the deeper cause of the error
will be greatly appreciated.

Thank you for your time,
Best,

roey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140730/a7c7a1fb/attachment.html>


More information about the fieldtrip mailing list