From e87c8080af987b2b0ed3dcca5ee616aa54f6fcc6 Mon Sep 17 00:00:00 2001 From: Denis Vida Date: Sun, 22 Dec 2024 12:03:21 -0500 Subject: [PATCH] Fix distance calculation in testPoints function to include x_dist --- RMS/Routines/Grouping3Dcy.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RMS/Routines/Grouping3Dcy.pyx b/RMS/Routines/Grouping3Dcy.pyx index 9a7bbecb7..9e3607d8c 100644 --- a/RMS/Routines/Grouping3Dcy.pyx +++ b/RMS/Routines/Grouping3Dcy.pyx @@ -549,7 +549,7 @@ def testPoints(int gap_threshold, np.ndarray[UINT16_TYPE_t, ndim=1] pointsy, \ z_dist = pointsz[i] - z_prev y_dist = pointsy[i] - y_prev - distance = y_dist**2 + z_dist**2 + z_dist**2 + distance = x_dist**2 + y_dist**2 + z_dist**2 # Count the point if there is no gap from the previous point if(distance < gap_threshold):