示例#1
0
def test_average_points_dist():
    p0 = Point(0.0, 0.0, 0.0, 3.0, 1)
    p1 = Point(0.0, 0.0, 1.0, 3.0, 1)
    p2 = Point(0.0, 1.0, 0.0, 3.0, 1)
    p3 = Point(1.0, 0.0, 0.0, 3.0, 1)
    av_dist = average_points_dist(p0, [p1, p2, p3])
    nt.ok_(av_dist == 1.0)
示例#2
0
 def __init__(self, points):
     super(SomaSimpleContour, self).__init__(points)
     points = np.array(self._points)
     self.radius = average_points_dist(self.center, points[:, :COLS.R])
示例#3
0
文件: neuron.py 项目: wvangeit/NeuroM
 def __init__(self, points):
     super(SomaB, self).__init__(points)
     self.center = tuple(points[0][:COLS.R])
     self.radius = average_points_dist(points[0], (points[1], points[2]))
示例#4
0
 def __init__(self, points):
     super(SomaThreePoint, self).__init__(points)
     self.radius = average_points_dist(points[0], (points[1], points[2]))
示例#5
0
 def __init__(self, points):
     super(SomaC, self).__init__(points)
     self.radius = average_points_dist(points[0], points[1:])