[pymvpa] feature id --> feature coordinate

Yaroslav Halchenko debian at onerussian.com
Tue Sep 21 12:54:01 UTC 2010


On Tue, 21 Sep 2010, Matthias Ekman wrote:
>  whatever version works :-)
we have 0.4.x series working and development 0.5 used by quite a few
people -- that is why I was asking

> ... altough most of my scripts are based
> on version 0.4.4
indeed we seems to be missing explicit instructions on that, so look
into

http://www.pymvpa.org/modref/mvpa.mappers.base.html?highlight=getinid#mvpa.mappers.base.Mapper.getInId

so, for a mapped dataset ds, try:

ds.mapper.getInId(10)

e.g:

n [4]: print dataset
------> print(dataset)
Dataset / int16 1452 x 530 uniq: 12 chunks 9 labels labels_mapped

In [5]: print dataset.mapper.getInId(1)
------> print(dataset.mapper.getInId(1))
[ 0  1 17]


In 0.5 the world becomes simpler -- arbitrary feature attributes allow to embed
original coordinates from the beginning:

http://dev.pymvpa.org/tutorial_datasets.html#loading-fmri-data
look for voxel_ids

> >On Tue, 21 Sep 2010, Matthias Ekman wrote:
> >>sorry -- this should be an easy one: how do I convert feature ids to
> >>feature/voxel coordinates?
-- 
                                  .-.
=------------------------------   /v\  ----------------------------=
Keep in touch                    // \\     (yoh@|www.)onerussian.com
Yaroslav Halchenko              /(   )\               ICQ#: 60653192
                   Linux User    ^^-^^    [175555]





More information about the Pkg-ExpPsy-PyMVPA mailing list