From f55d58b370ddbbacef1ce1f32c39b292a755201e Mon Sep 17 00:00:00 2001 From: ahmedk <karim.ahmed@xfel.eu> Date: Fri, 12 May 2023 11:27:53 +0200 Subject: [PATCH] improve dicts merging --- notebooks/pnCCD/Correct_pnCCD_NBC.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb b/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb index 98d913e17..ed6c8044d 100644 --- a/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb +++ b/notebooks/pnCCD/Correct_pnCCD_NBC.ipynb @@ -327,8 +327,8 @@ " try:\n", " gain_metadata = pnccd_cal.metadata(calibrations=[\"RelativeGainCCD\"])\n", " for mod, md in gain_metadata.items():\n", - " for cname, c_md in md.items():\n", - " pnccd_metadata[mod][cname] = c_md\n", + " pnccd_metadata[mod].update(md)\n", + "\n", " except CalCatError as e: # TODO: fix after getting new exceptions.\n", " warning(f\"{e} While asking for {pnccd_cal.illuminated_calibrations}\")\n", " warning(\"RelativeGainEPix100 is not retrieved from the calibration database. \"\n", -- GitLab