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

Eelke Spaak eelke.spaak at donders.ru.nl
Thu Jul 31 09:00:26 CEST 2014


Hi Roey,

That sounds like a bug to me. I added this on our bugzilla:
http://bugzilla.fcdonders.nl/show_bug.cgi?id=2664 . You should be on
the cc list for that bug.

Best,
Eelke

On 30 July 2014 22:24, Roey Schurr <roeysc at gmail.com> wrote:
> 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
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



More information about the fieldtrip mailing list