diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb index 8172dcbd0a606f9a456007f14add224f20ee1f6e..41e4073e3d62d315806013000d5da136785e7d5f 100644 --- a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb +++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb @@ -743,6 +743,12 @@ "metadata": {}, "outputs": [], "source": [ + "# Skip das not available in CALCAT\n", + "agipd_das = [da for da in karabo_da if da in agipd_metadata.keys()]\n", + "missing_das = set(karabo_da) - set(agipd_das)\n", + "warning(f\"Skipping correcting {missing_das} as they are not mapped to this detector in CALCAT.\")\n", + "karabo_da = agipd_das\n", + "\n", "# Validate constants availability and exclude modules with no offsets.\n", "for da, calibrations in agipd_metadata.items():\n", " mod = modules[karabo_da.index(da)]\n", @@ -764,8 +770,6 @@ " if warn_missing_constants:\n", " warning(f\"Constants {warn_missing_constants} were not retrieved for {da}.\")\n", "\n", - "# Skip das not available in CALCAT and with no constants.\n", - "karabo_da = [da for da in karabo_da if da in agipd_metadata.keys()]\n", "if not da: # Offsets are missing for all modules.\n", " raise Exception(\"Could not find offset constants for any modules, will not correct data.\")" ]