diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb index 8565e8db22fe54fad5457d5e54025791dfabd2a2..c34233b9ae48d960dfebcc73e9cd710b23bcb5d2 100644 --- a/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb +++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb @@ -15,7 +15,9 @@ "source": [ "run = 11 # runs to process, required\n", "out_folder = \"/gpfs/exfel/data/scratch/ahmedk/test/AGIPD_Corr\" # path to output to, required\n", - "modules = [-1]" + "karabo_id = \"SPB_DET_AGIPD1M-1\" # karabo karabo_id\n", + "modules = [-1]\n", + "karabo_da = ['-1'] # a list of data aggregators names, Default [-1] for selecting all data aggregators" ] }, { @@ -52,8 +54,26 @@ "else:\n", " main_dict = {\"time-summary\":dict()}\n", "\n", - "if modules[0] == -1:\n", - " modules = list(range(16))\n", + "# Extracting Instrument string\n", + "instrument = karabo_id.split(\"_\")[0]\n", + "# Evaluate detector instance for mapping\n", + "if instrument == \"SPB\":\n", + " dinstance = \"AGIPD1M1\"\n", + " nmods = 16\n", + "elif instrument == \"MID\":\n", + " dinstance = \"AGIPD1M2\"\n", + " nmods = 16\n", + "# TODO: Remove DETLAB\n", + "elif instrument == \"HED\" or instrument == \"DETLAB\":\n", + " dinstance = \"AGIPD500K\"\n", + " nmods = 8\n", + "\n", + "if karabo_da[0] == '-1':\n", + " if modules[0] == -1:\n", + " modules = list(range(nmods))\n", + " karabo_da = [\"AGIPD{:02d}\".format(i) for i in modules]\n", + "else:\n", + " modules = [int(x[-2:]) for x in karabo_da]\n", "\n", "# This is needed only if AGIPD Correction notebook had no precorrection notebooks for retrieving constants\n", "# gather all generated sequence yml files for time summary of retrieved constant in retrieved_constants.yml\n", diff --git a/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb b/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb index 7853cc10f8f1fc7779e13751b5241b83df728719..58f4256055a86bd912950078940b09b16f6dd418 100644 --- a/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb +++ b/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb @@ -803,8 +803,9 @@ " gain[gain != 0] -= 1\n", " \n", " fstride = 1\n", - " if not flip_rgain: # rgain was taken during flipped orientation\n", - " fstride = -1\n", + " if corr_bools.get('relgain'):\n", + " if not flip_rgain: # rgain was taken during flipped orientation\n", + " fstride = -1\n", " \n", " data = np.bitwise_and(data, 0b0011111111111111).astype(np.float32)\n", "\n", diff --git a/notebooks/LPD/LPDChar_Darks_NBC.ipynb b/notebooks/LPD/LPDChar_Darks_NBC.ipynb index 5d042bbe4b8de144e050ffae8195f2757d98dd52..34647e1811b8fbc75e91460a732f13f721b2c864 100644 --- a/notebooks/LPD/LPDChar_Darks_NBC.ipynb +++ b/notebooks/LPD/LPDChar_Darks_NBC.ipynb @@ -512,7 +512,7 @@ "\n", " if gain == 0:\n", " leg = grid[gain].legend(\n", - " loc='outside-top', ncol=3, \n", + " loc='upper center', ncol=3, \n", " bbox_to_anchor=(0.1, 0.25, 0.7, 1.0))\n", "\n", " grid[gain].text(820, np.nanmax(hn)*0.4,\n",