[pymvpa] Recovering original image dimensions after remove_invariant_features
Yaroslav Halchenko
debian at onerussian.com
Fri Oct 24 18:10:44 UTC 2014
On Fri, 24 Oct 2014, Shane Hoversten wrote:
> In [20]: dsinv.a.mapper
> Out[20]: ChainMapper(nodes=[FlattenMapper(shape=(73, 87, 73),
> auto_train=True, space='voxel_indices'),
> StaticFeatureSelection(dshape=(463623,), slicearg=array([ 53391, 53462,
> 53463, ..., 415980, 415981, 416053]))])
> An additional note, in case it matters: this dataset is the result of
> vstacking two datasets (the same subject on two scanning days; the masks
> on both days are the same.A The subject's brain is also, presumably, the
> same.) using this command
> agg_ds = vstack((ds1, ds2), a=0)
> And as a reminder, here's how I write this thing to disk after processing
> with it:
> res = sl(dsinv)
> nimg = map2nifti(dsinv, res.samples[0])
> filename = "{}.agg.{}.r{}.c{}__{}".format(subj, contrast, radius_size,
> clfName, maskName)
> nimg.to_filename(filename)
> Does that help any?A Am I doing anything obviously wrong?
I do not see anything obviously wrong and I always leave a possibility
for a bug to creep in ;) dsinv has all the information (FlattenMapper)
to bring it back to proper 3d space but somehow it doesn't :-/
1. what is the output of
map2nifti(dsinv, res.samples[0]).get_shape()
map2nifti(dsinv, res[0]).get_shape()
map2nifti(dsinv, res).get_shape()
2. if above would not give us a relief, would you mind sharing
those two datasets?
h5save('/tmp/datasets.hdf5', {'dsinv': dsinv, 'res': res})
and send me (mailing list would not allow heavy attachments) the
'/tmp/datasets.hdf5' or post it online -- unlikely any private
information remained in them at this stage ;)
Also I believe we haven't heard yet about what version of pymvpa you
are using ;)?
> Thanks for your help and suggestions.A PyMVPA is such a cool community.
oh -- thank you for the warm words ;-)
--
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
More information about the Pkg-ExpPsy-PyMVPA
mailing list