[pymvpa] searchlight on ER data

Yaroslav Halchenko debian at onerussian.com
Wed Dec 29 18:58:07 UTC 2010


Hi Anna,

Sorry for the delay with replies.

The main issue is that 0.4 is not ready to provide adequate
support for doing spatio-temporal searchlight analysis "properly" out of
the box.  That was one of the reason for initiating development of
0.5.

What I meant by "properly":

  you are specifying "radius" for your searchlight (e.g. 1), is
  that in voxels?  seconds? mm?

  could we add distances in time and space together?

so we wanted to have a clean way to specify radii per each dimension (i.e.
space/time) without hassle, so that they (time and space) do not
"interfere" with each other.

in 0.4 you could probably craft some custom metric and distance function
which would have proper separation between the two "dimension"
(time/space), but we do not have it built-in.

What you probably could do (but once again -- we haven't tested that
much in 0.4) -- assign a metric where you disregard difference between
time and space and just ask for neighboring voxels in space and time,
but once again, it would make voxel  (1,1,1) at time 0 as distant from
(0,0,0) at time 0, as (1,1,0) at time 1, and depending on the radii
might not take any other voxel at time 1; so it litterally becomes some
kind of spatio-temporal ellipsoid ;)

to accomplish that you just assign the metric to both chainmapper of the
ds and its trailing mapper (which has a metric with correct dimensions
actually, but adding actual mm^2 to sec^2 has even less sense ;)):

ds.mapper._mappers[1].metric = \
ds.mapper.metric = DescreteMetric(elementsize=[1.0, 1.0, 1.0, 1.0],
                                  distance_function=cartesianDistance)

That might work (at least it doesn't crash ;))

But, once again, even if it works, its interpretation and validity are at
question ;)

For doing "correct" Spatio-temporal searchlight in upcoming 0.6, see
http://dev.pymvpa.org/tutorial_eventrelated.html#if-that-was-easy where search
"radii" can be specified directly per each dimension (space/time).

On Wed, 29 Dec 2010, Anna Manelis wrote:

>    I am trying to use searchlight on event-related fMRI data. The error
>    message suggests that there is a problem with assigning metrics to
>    MappedDataset.
-- 
=------------------------------------------------------------------=
Keep in touch                                     www.onerussian.com
Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic



More information about the Pkg-ExpPsy-PyMVPA mailing list