From a8c73bab0fb729a4b75b91da6cff3817d52a4ed3 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Mon, 12 Aug 2024 10:04:10 +0200 Subject: [PATCH] count correctly: 1, 1, 2, 3, ... -> 0, 1, 2, 3, ... --- dap/algos/forcesend.py | 4 ++-- dap/worker.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dap/algos/forcesend.py b/dap/algos/forcesend.py index f1f205d..73d19c2 100644 --- a/dap/algos/forcesend.py +++ b/dap/algos/forcesend.py @@ -15,7 +15,7 @@ def calc_force_send(results, data, pixel_mask_pf, image, data_summed, n_aggregat if not apply_aggregation: data_summed = None - n_aggregated_images = 1 + n_aggregated_images = 0 if not apply_aggregation and not apply_threshold: data = image @@ -73,7 +73,7 @@ def calc_apply_aggregation(results, data, data_summed, n_aggregated_images): if n_aggregated_images >= results["aggregation_max"]: force_send_visualisation = True data_summed = None - n_aggregated_images = 1 + n_aggregated_images = 0 return data, force_send_visualisation, data_summed, n_aggregated_images diff --git a/dap/worker.py b/dap/worker.py index 25655bd..3919c33 100644 --- a/dap/worker.py +++ b/dap/worker.py @@ -45,7 +45,7 @@ def work(backend_address, accumulator_host, accumulator_port, visualisation_host data_summed = None - n_aggregated_images = 1 + n_aggregated_images = 0 while True: