[pymvpa] Searchlight radius questions

Michael Hanke mih at debian.org
Tue Sep 11 06:52:11 UTC 2012


On Tue, Sep 11, 2012 at 08:49:09AM +0200, Michael Hanke wrote:
> On Mon, Sep 10, 2012 at 11:21:02AM -0700, Jonas Kaplan wrote:
> > Seems to me that radius of 1 gives 7 voxels, e.g.:
> > 
> > In [117]: radii = range(5)
> > 
> > In [118]: for radius in radii:
> >    .....:     sp = Sphere(radius=radius)
> >    .....:     size = len(sp((1,1,1)))
> >    .....:     print "Radius %d size: %d" % (radius,size)
> >    .....:     
> > Radius 0 size: 1
> > Radius 1 size: 7
> > Radius 2 size: 33
> > Radius 3 size: 123
> > Radius 4 size: 257
> 
> Thanks Jonas!
> 
> In PyMVPA >= 0.6 voxel neighbors are elements that share an edge
> (not just a corner), hence 7 elements for radius=1 (2 elements per axis
> and the center). radius=0 will select just the center.

Err, the need to share _two_ edges, not just one.

-- 
Michael Hanke
http://mih.voxindeserto.de



More information about the Pkg-ExpPsy-PyMVPA mailing list