[pymvpa] ValueError: FlattenMapper has not been trained for data shape '(47, 84, 80)' (known only '(50, 85, 80)').
Stephanie A. Gagnon
Stephanie.A.Gagnon at Dartmouth.edu
Wed Apr 14 15:29:11 UTC 2010
When I try to load an ROI mask made by 3DAFNItoNIFTI, I get this error:
loading dataset
Traceback (most recent call last):
File "ROI_mask_wfeaturesel.py", line 8, in <module>
ds = fmri_dataset(samples='tcat_bold_detrended.nii', targets=attr.targets,
chunks=attr.chunks, mask='14mar10tc_divided_ROI_mask.nii')
File "/usr/local/lib/python2.6/dist-packages/mvpa/datasets/mri.py", line 172,
in fmri_dataset
flatmask = ds.a.mapper.forward1(mask)
File "/usr/local/lib/python2.6/dist-packages/mvpa/mappers/base.py", line 232,
in forward1
return self.forward(data[np.newaxis])[0]
File "/usr/local/lib/python2.6/dist-packages/mvpa/mappers/base.py", line 221,
in forward
return self._forward_data(data)
File "/usr/local/lib/python2.6/dist-packages/mvpa/mappers/flatten.py", line 107,
in _forward_data
% (str(sshape), str(oshape)))
ValueError: FlattenMapper has not been trained for data shape '(47, 84, 80)' (known
only '(50, 85, 80)').
.py SCRIPT:
print "loading dataset"
#load nifti dataset
attr = SampleAttributes('31mar10js_contextvspace_onsets_allnumbers.txt')
ds = fmri_dataset(samples='tcat_bold_detrended.nii', targets=attr.targets, chunks=attr.chunks,
mask='ROI_mask.nii')
print "Dataset"
print ds
Thanks,
Steph
More information about the Pkg-ExpPsy-PyMVPA
mailing list