[FieldTrip] source pos dimensions ft_sourcestatistics
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Thu May 18 21:35:38 CEST 2017
Hi Stephen,
source2full and source2sparse are probably quite outdated, and do not seem to work well anymore with the latest type of source-level data structures. Most relevantly, the inside field these days is by default a boolean vector of size nposx1, whereas once upon a time the inside and outside fields together contained the indices of the dipole positions, indicating which positions are on the in-/outside.
Do you need the source2sparse step to begin with?
Best,
JM
On 17 May 2017, at 16:46, Stephen Whitmarsh <stephen.whitmarsh at gmail.com<mailto:stephen.whitmarsh at gmail.com>> wrote:
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
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170518/db1851e0/attachment-0002.html>
More information about the fieldtrip
mailing list