Back to the main page.

Bug 1380 - ft_checkdata fails with 'source' data with .pos field

Status CLOSED FIXED
Reported 2012-03-20 10:42:00 +0100
Modified 2019-08-10 11:56:19 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P3 major
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Gio Piantoni - 2012-03-20 10:42:53 +0100

I have some source data in this format (from 'dics') source = dim: [15 18 15] freq: 39.9818264425261 time: 0.199999999999991 cumtapcnt: [515x1 double] pos: [4050x3 double] inside: [1x2015 double] outside: [1x2035 double] method: 'average' avg: [1x1 struct] cfg: [1x1 struct] If you run ft_checkdata(source, 'datatype', 'source') (which is run in 'ft_sourcegrandaverage' line 86). then it crashes at line 583. Error using reshape To RESHAPE the number of elements must not change. It's because it's trying to reshape the source.pos field. I did not notice the error before because, since yesterday (r5480), parameterselection can handle higher-dimensional data http://code.google.com/p/fieldtrip/source/detail?r=5480 I suggest to add the field 'pos' to the 'exclude' fields (line 560 of ft_checkdata) exclude = {'cfg' 'fwhm' 'leadfield' 'q' 'rough'}; Let me know what you think about it. Thanks!


Jan-Mathijs Schoffelen - 2012-03-20 11:00:51 +0100

Hi Giovanni, Sorry, my fault. Indeed probably introduced by yesterday's change. I think that adding 'pos' to the exclude is a good idea. Could you take care of that? Thanks, JM


Gio Piantoni - 2012-03-20 11:15:13 +0100

(In reply to comment #1) Ok, I'll do it. Just wanted to be sure that "exclude" is the best solution


Gio Piantoni - 2012-03-20 11:25:13 +0100

committed!


Jan-Mathijs Schoffelen - 2012-03-20 11:28:09 +0100

bravo.


Robert Oostenveld - 2019-08-10 11:56:19 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on https://github.com/fieldtrip/fieldtrip/issues.