[FieldTrip] source pos dimensions ft_sourcestatistics

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Wed May 17 16:46:53 CEST 2017


Hi there,


After beamformer sourceanalysis I end up with datastructures looking like:

  struct with fields:

         freq: 10.5000
          cfg: [1×1 struct]
          pos: [2982×3 double]
          pow: [2982×1 double]
       inside: [2982×1 logical]
    powdimord: 'pos'

The .inside field is created by ft_selectdata used to average across
frequencies, and contains all 1s. Running sourceanalysis with this data
trows the following error:


Error using spm_bwlabel
spm_bwlabel: CONN must be 6, 18 or 26

Error in clusterstat (line 222)
      [negclusobs, negnum] = spm_bwlabel(tmp, 2*numdims);

Error in ft_statistics_montecarlo (line 347)
  [stat, cfg] = clusterstat(cfg, statrand, statobs);

Error in ft_sourcestatistics (line 205)
  [stat, cfg] = statmethod(cfg, dat, design);

*222 *      [negclusobs, negnum] = spm_bwlabel(tmp, 2*numdims);


I think this results because of a wrong estimate of the dimensionality,
resulting from the fact that the data is represented in an array rather
than a 3-dimensional matrix, which it seems to expect.

I think therefor that I might need to convert my data back into a 3-d
representation, i..e not a sparse but full representation. I have tried
using ft_source2full, but that is not straightforward as I only have inside
voxels/positions. In other words, I would need to do exactly the same as
ft_source_statistics seems to want to do with spm_bwlabel.

So I guess I might just have put FieldTrip on the wrong leg, to use a Dutch
expression.

Any suggestions?

Best,
Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170517/fe2e1e02/attachment.html>


More information about the fieldtrip mailing list