def calculate_position_error_at_z(self, z=0):
'''
Returns the standard deviation in x and y, and the euclidean distance between
pairs of coordinates.
'''
xy_at_given_z = []
for ax in self.axes:
x, y = ax.getXY(z=z)
xy_at_given_z.append((x,y))
X = [xy[0] for xy in xy_at_given_z]
Y = [xy[1] for xy in xy_at_given_z]
pairs = []
for x, y in zip(X, Y):
pairs.append((x,y))
distances = distance.pdist(pairs)
return ((np.std(X), np.std(Y)), np.mean(distances))
评论列表
文章目录