From 4bdd91bc7193df70423d6efa2d90a0165bdeb58d Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Thu, 16 Nov 2023 14:55:46 +0100
Subject: [PATCH] number of cells is maxcell+1 as memory cells starts from 0

---
 src/cal_tools/dssclib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cal_tools/dssclib.py b/src/cal_tools/dssclib.py
index 0147eb3e5..a17ec3648 100644
--- a/src/cal_tools/dssclib.py
+++ b/src/cal_tools/dssclib.py
@@ -16,7 +16,7 @@ def get_num_cells(fname, h5path):
         if cells == []:
             return
         maxcell = np.max(cells)
-        return maxcell
+        return maxcell+1
 
 
 def get_pulseid_checksum(fname, h5path, h5path_idx):
-- 
GitLab