[pymvpa] loading sample with varying dimension
Yaroslav Halchenko
debian at onerussian.com
Thu Apr 8 20:38:57 UTC 2010
Hi Temilade,
Unfortunately in the case of a sequence specified as samples, it assumes
each entry to be a sample (so it was trying to create 5D array with 10
samples).
As a workaround, you could load them up manually... smth (not tested...
just typing):
samples=np.vstack([NiftiImage(x).asarray() for x in [fmri_src1, ...]])
probably you would also like to wrap it all into a new NiftiImage with
that data and a header from one of the files -- then you could again
created your NiftiDataset
hope this helps
On Thu, 08 Apr 2010, Temilade Adelore wrote:
> Hello Experts,
> I am trying to load samples into pymvpa using the following command:
> pre_fmri_src = NiftiDataset(samples=[fmri_src1, fmri_src2, fmri_src3,
> fmri_src4, fmri_src5, fmri_src6, fmri_src7, fmri_src8,
> fmri_src9,fmri_src10], labels=4, chunks=10, enforce_dim=None,
> mask=None)
> Each of the 10 samples correspond to a 4D NiftiImage instance.
--
.-.
=------------------------------ /v\ ----------------------------=
Keep in touch // \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko /( )\ ICQ#: 60653192
Linux User ^^-^^ [175555]
More information about the Pkg-ExpPsy-PyMVPA
mailing list