From 11b1db19cdcc50839adda6b2e7986fabe464823e Mon Sep 17 00:00:00 2001 From: Dev Singh Date: Wed, 23 Sep 2020 14:34:34 +0000 Subject: [PATCH] fix: add self when refering to coords Signed-off-by: Dev Singh --- analysis-master/tra_analysis/fits.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/analysis-master/tra_analysis/fits.py b/analysis-master/tra_analysis/fits.py index b3817929..71bfa3ca 100644 --- a/analysis-master/tra_analysis/fits.py +++ b/analysis-master/tra_analysis/fits.py @@ -38,7 +38,7 @@ class CircleFit: self.ournp = np #todo: implement cupy correctly else: # following block combines x and y into one array if not already done - self.coords = self.ournp.vstack(([x_data.T], [y_data.T])).T + self.coords = self.ournp.vstack(([x.T], [y.T])).T def calc_R(x, y, xc, yc): """Returns distance between center and point""" return self.ournp.sqrt((x-xc)**2 + (y-yc)**2) @@ -48,8 +48,8 @@ class CircleFit: return Ri - Ri.mean() def LSC(self): """Fits given data to a circle and returns the center, radius, and variance""" - x = coords[:, 0] - y = coords[:, 1] + x = self.coords[:, 0] + y = self.coords[:, 1] # guessing at a center x_m = self.ournp.mean(x) y_m = self.ournp.mean(y)