diff --git a/notebooks/LPD/LPDChar_Darks_NBC.ipynb b/notebooks/LPD/LPDChar_Darks_NBC.ipynb index 277d5231cc5b627733c378eeacefab5d952134ec..c4820ced9a370e962349ecc99ee86cfcb78ddf8d 100644 --- a/notebooks/LPD/LPDChar_Darks_NBC.ipynb +++ b/notebooks/LPD/LPDChar_Darks_NBC.ipynb @@ -552,7 +552,11 @@ " offset = np.nanmedian(data)\n", " noise = np.nanstd(data)\n", " xrange = [np.nanmin(data_g[cap][qm]), np.nanmax(data_g[cap][qm])]\n", - " nbins = int(xrange[1] - xrange[0])\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", + " nbins = int(xrange[1] - xrange[0])\n", "\n", " hn, cn = np.histogram(data, bins=nbins, range=xrange)\n", "\n",