<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
with previous versions of pymvpa (=< 0.4.7) I used <br>
<br>
dataset.mapper.getNeighbors(feature_id, radius) <br>
<br>
to construct nodes for a functional connectivity analysis. In mvpa2
this functionality is embedded in <br>
<br>
mvpa2.misc.neighborhood.Sphere()<br>
<br>
However, as written in the docstring "
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
No validation of producing coordinates within any extent is done"
which would be necessary for my purpose.<br>
<br>
There is some commented code in mvpa2/misc/neighborhood.py which I
thought I could simply uncomment for my purpose (see below)... but
it doesn't work. Where does 'self.extent' come from, or more
specifically: may I ask you guys to give me some advise on how to do
the extent checking here?<br>
<br>
# XXX may be optionally provide extent checking?<br>
## # now filter out illegal coordinates if they really are
outside the<br>
## # bounds<br>
## if (coordinate - self.radius < 0).any() \<br>
## or (coordinate + self.radius >= self.extent).any():<br>
## coord_array = array([c for c in coord_array \<br>
## if (c >= 0).all()<br>
## and (c <
self.extent).all()])<br>
## coord_array = coord_array.transpose()<br>
<br>
<br>
Thanks in advance,<br>
Matthias<tt class="descclassname"></tt><tt class="descname"><span
class="highlighted"></span></tt>
</body>
</html>