[FieldTrip] ft_topoplotER(): reference to non-existent field 'topo'

Harold Cavendish harold.cav89 at gmail.com
Mon Feb 1 13:41:59 CET 2016


Dear FieldTrip users,

I've been trying to use my manually created data structure containing
averaged ERP from 28 subjects and 61 channels, each lasting 1075 time
points as per these instructions:
http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat

*data.mat:*
label: {61x1 cell}
fsample: 250
trial: {1x28 cell}
  columns: [61x1075 double]
time: {1x28 cell}
elec: [1x1 struct]
  chanpos: [61x3 double]
  elecpos: [61x3 double]
  label: {61x1 cell}
  unit: 'cm'
avg: [61x1075 double]

to construct ERP topoplots using ft_topoplotER() and whatever else will be
needed for a timelocked analysis (I've already used the same data structure
to do a permutation test with success).

To do that, I've been following this tutorial:
http://www.fieldtriptoolbox.org/tutorial/plotting#topoplot_functions

> cfg = [];
> cfg.xlim = [450 500] % arbitrary time interval
> cfg.layout = 'M10.lay' % custom layout; the provided easycapM10.mat has
different labels

> ft_topoplotER(cfg, data)

This, however, produced the following error:

*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 358)*
*      data = ft_datatype_comp(data);*

*Error in topoplot_common (line 74)*
*data = ft_checkdata(data, 'datatype', {'comp', 'timelock', 'freq'});*

*Error in ft_topoplotER (line 192)*
*cfg = topoplot_common(cfg, varargin{:});*

Using common sense, I ‘fixed’ topoplot_common.m by changing the order of
cell parameters at line 74 so that 'timelock' was before 'comp' and it
worked – I can see no errors and the topoplots look okay.


Could you please help me understand what's the issue? Although it works
now, I would like to future-proof my data and make it all reproducible.

I think it's trying to figure out whether my data is timelocked, in the
frequency domain, or perhaps a composite, but it seems that the detection
algorithm is either faulty (I haven't seen this ‘topo’ field in any example
so far) or my data structure is missing something (I couldn't find another
topoplot-ready EEG data among the tutorial files to compare them,
unfortunately, and MEG files appear to be considerably different).

Thank you!

Best wishes,
Harold
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160201/c70f7664/attachment-0001.html>


More information about the fieldtrip mailing list