From 12f87466e94c61d5960e55acdf9e9410bb8fcb15 Mon Sep 17 00:00:00 2001
From: amitjans <amitjans@ethz.ch>
Date: Thu, 8 Jul 2021 23:00:47 +0200
Subject: [PATCH] Small fix

---
 tools.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools.py b/tools.py
index 792271d..040c005 100644
--- a/tools.py
+++ b/tools.py
@@ -126,6 +126,9 @@ class Main:
             if len(coord) > 1 and dist_factor is not None:
                 coord, fit_error = dark_ions(img, coord, dist_factor)
                 self.fit_avg.update_value(fit_error)
+
+            else:
+                fit_error = -1
         else:
             roundness = 0
             fit_error = -1
-- 
GitLab