From c1f44e643af3ca5771e228c3412e8707dd7cd4d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Le=20Guyader?= <loic.le.guyader@xfel.eu>
Date: Fri, 27 Aug 2021 15:35:01 +0200
Subject: [PATCH] Change sum to mean such that horizontal and vertical t
 threshold above dark level should be the same

---
 src/toolbox_scs/routines/boz.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/toolbox_scs/routines/boz.py b/src/toolbox_scs/routines/boz.py
index 61c1fbd..b8274bd 100644
--- a/src/toolbox_scs/routines/boz.py
+++ b/src/toolbox_scs/routines/boz.py
@@ -346,9 +346,9 @@ def find_rois(data_mean, threshold):
     rois: dictionnary of rois
     """
     # compute vertical and horizontal projection
-    pX = data_mean.sum(axis=0)
+    pX = data_mean.mean(axis=0)
     pX = pX[:256]  # half the ladder since there is a gap in the middle
-    pY = data_mean.sum(axis=1)
+    pY = data_mean.mean(axis=1)
 
     # along X
     lowX = int(np.argmax(pX[:64] > threshold))  # 1st occurrence returned
-- 
GitLab