From 0e259f03533c0427d5198d6985c5c18a00802e15 Mon Sep 17 00:00:00 2001 From: Vermaas <vermaas@astron.nl> Date: Fri, 23 Jun 2023 12:15:34 +0200 Subject: [PATCH] another bugfix in algorithm (poor was never reached) --- atdb/taskdatabase/models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py index cde087b7..32aefede 100644 --- a/atdb/taskdatabase/models.py +++ b/atdb/taskdatabase/models.py @@ -106,10 +106,9 @@ def calculate_qualities(task): rfi_percent = int(record['rfi_percent']) if rfi_percent > 0: quality = "good" - if (rfi_percent >= quality_thresholds['moderate'] and - rfi_percent <= quality_thresholds['poor']) : + if rfi_percent >= quality_thresholds['moderate']: quality = "moderate" - else: + if rfi_percent > quality_thresholds['poor']: quality = "poor" return quality -- GitLab