[pymvpa] Searchlight radius questions

J.A. Etzel jetzel at artsci.wustl.edu
Tue Sep 11 15:46:33 UTC 2012


The counts for radius 0, 1, and 2 make sense to me. As I understand you, 
pyMVPA follows a "faces must touch" rule: each increase in radius is 
done by adding all the voxels that share at least face with the previous 
radius.

But I figure 86 voxels surrounding the center for a radius three 
searchlight, not 122. I posted pictures at:

http://mvpa.blogspot.com/2012/09/pymvpa-searchlight-shapes.html

Jo



On 9/11/2012 1:52 AM, Michael Hanke wrote:
> 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.
>

-- 
Joset A. Etzel, Ph.D.
Research Analyst
Cognitive Control & Psychopathology Lab
Washington University in St. Louis
http://mvpa.blogspot.com/



More information about the Pkg-ExpPsy-PyMVPA mailing list