From 774c89555002b5ae8a1811063ed06daaa64b16a7 Mon Sep 17 00:00:00 2001 From: amitjans <amitjans@ethz.ch> Date: Tue, 6 Jul 2021 10:36:35 +0200 Subject: [PATCH] Change linearity threshold --- tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools.py b/tools.py index 30f1143..9d620a3 100644 --- a/tools.py +++ b/tools.py @@ -476,7 +476,7 @@ def ion_linearity(points): y = points[:, 0] x = points[:, 1] _, residuals, _, _, _ = np.polyfit(x, y, deg=1, full=True) - if residuals < 2 or len(residuals) == 0: + if residuals < 4 or len(residuals) == 0: linearity = 'linear' else: linearity = 'zigzag' -- GitLab