[pymvpa] Copying Mappingdata from multiple datasets

Yaroslav Halchenko debian at onerussian.com
Fri Jul 29 12:02:12 UTC 2011


Hi Nynke,

I believe that in 0.4.x you could simply "add" datasets which should
preserve their type/masking:

(Pydb) data
<Dataset / int16 2 x 294912 uniq: 2 chunks 2 labels>
(Pydb) data2
<Dataset / int16 2 x 294912 uniq: 2 chunks 2 labels>
(Pydb) print (data+data2).__class__
<class 'mvpa.datasets.nifti.NiftiDataset'>
*(Pydb) print (data+data2)
Dataset / int16 4 x 294912 uniq: 2 chunks 2 labels


so just add them all up, usually I do it with smth like

ds = None
for s in subjects:
    ds_ = NiftiDataset(....)
    ... preprocess data ...
    if ds is None:
        ds = ds_
    ds += ds_
del ds_


On Fri, 29 Jul 2011, Nynke van der Laan wrote:

> When I try to perform a searchlight analysis I get the following
> message: "Searchlight only works with MappedDatasets that has metric
> assigned."

> Thus, I suppose that the mapping from the functional scans (and it's
> associated measures such as voxel size) are missing and the dataset I
> created is not a MappedDataset. Although I did not manage to create a
> MappedDataset, also not after consulting your information on
> (http://www.pymvpa.org/api/mvpa.datasets.mapped.MappedDataset-class.html
> )

> Do you have any suggestions?

> Btw, I'm still using the older package on Neurodebian (this analysis
> if for a revision and I prefer not to switch to a new version in
> between revisions ;) )

> Thanks in advance!

> Best,
> Nynke van der Laan

-- 
=------------------------------------------------------------------=
Keep in touch                                     www.onerussian.com
Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic



More information about the Pkg-ExpPsy-PyMVPA mailing list