From be26b8ee808422e478a01a14f6663b23501db11d Mon Sep 17 00:00:00 2001
From: Karim Ahmed <karim.ahmed@xfel.eu>
Date: Thu, 10 Nov 2022 15:25:31 +0100
Subject: [PATCH] xrange[1] - xrange[0]

---
 notebooks/LPD/LPDChar_Darks_NBC.ipynb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/notebooks/LPD/LPDChar_Darks_NBC.ipynb b/notebooks/LPD/LPDChar_Darks_NBC.ipynb
index fcde6c8e4..c4820ced9 100644
--- a/notebooks/LPD/LPDChar_Darks_NBC.ipynb
+++ b/notebooks/LPD/LPDChar_Darks_NBC.ipynb
@@ -552,7 +552,7 @@
     "            offset = np.nanmedian(data)\n",
     "            noise = np.nanstd(data)\n",
     "            xrange = [np.nanmin(data_g[cap][qm]), np.nanmax(data_g[cap][qm])]\n",
-    "            if len(set(xrange)) == 1:\n",
+    "            if xrange[1] == xrange[0]:\n",
     "                xrange = [0, xrange[0]+xrange[0]//2]\n",
     "                nbins = data_g[cap][qm].shape[0]\n",
     "            else:\n",
-- 
GitLab