// normalize for far-field if requested
if (ff):
X -= self.center
Xn = np.sqrt(np.sum(X**2, axis=0))
X *= constants.get("ffdist")/Xn
X += self.center
D = distance(self.R, X)
After Change
// normalize for far-field if requested
if (ff):
// unit vectors pointing towards sources
p = (X - self.center)
p /= np.linalg.norm(p)
// The projected microphone distances on the unit vectors
D = np.dot(self.R.T, p)
// subtract minimum in each column
D -= np.min(D)
else:
D = distance(self.R, X)