[FieldTrip] error using ft_combineplanar() after spm2fieldtrip()

Ian Gould ian.gould at psy.ox.ac.uk
Tue Dec 11 18:06:29 CET 2012

I'm getting the following error message when trying to use ft_combineplaner():
>Error using ft_checkdata (line 406)
>This function requires ctf151_planar, ctf275_planar, neuromag122, neuromag306,
>bti248_planar, bti148_planar, itab153_planar, yokogawa160_planar, yokogawa64_planar or
>yokogawa440_planar data as input, but you are giving neuromag306 data.

Obviously, this error message doesn't make complete senseā€¦.

The problem seems to be due to the fact that my data were preprocessed using SPM and converted to fieldtrip format using spm2fieldtrip(). Spm2fieldtrip() seems to spit out data structures compatible with the older fieldtrip data format, which has the following subfields, and lacks fields like 'grad' which are present after preprocessing the data wholly using recent fieldtrip releases:
   avg: [338x1501 double]
      var: [338x1501 double]
     time: [1x1501 double]
      dof: [338x1501 double]
    label: {338x1 cell}
   dimord: 'chan_time'
      cfg: [1x1 struct]

I can circumvent this error for now with the quick/easy hack of editing ft_checkdata line 387 to accept 'avg' data so it reads:
>if isfield(data, 'grad') || isfield(data, 'elec') || isfield(data, 'avg')
This results in ft_combineplanar() and subsequent data topo/muliplotting working fine, but I'm not sure whether the missing 'grad' data would be troublesome in other situations, in which case  spm2fieldtrip(),  ft_combineplanar() or ft_checkdata() might need tweaking?

Any advice on whether I'm doing something wrong here and/or if this is readily fixable would be greatly appreciated! I'm using the latest fieldtrip release (10/12/12) and SPM8.

Ian Gould, PhD
Brain & Cognition Laboratory
Department of Experimental Psychology
University of Oxford
South Parks Road
Oxford, OX1 3UD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121211/5f690f3e/attachment-0001.html>

More information about the fieldtrip mailing list