diff --git a/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb b/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb index 2486a3d7f3d2565ab510c09b8780b74d8aba4892..d28fe59b6cf04a24ee1a104f055ac21fe72cb48f 100644 --- a/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb +++ b/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb @@ -28,12 +28,18 @@ "The same result would be reached in case the needed dark calibration constants were not retrieved for all modules and `offset_correction` is True.\n", "In case one of the gain constants were not retrieved `gain_correction` is switched to False and gain correction is disabled.\n", "\n", - "The `data` datasets stored in the RECEIVER source along with the corrected image (`adc`) and `mask` are: \n", + "The `data` datasets stored in the RECEIVER source along with the corrected image (`adc`) and `mask` are:\n", + "\n", " - `gain`\n", + "\n", " - `bunchId`\n", + "\n", " - `memoryCell`\n", + "\n", " - `frameNumber`\n", + "\n", " - `timestamp`\n", + "\n", " - `trainId`" ] }, @@ -275,6 +281,8 @@ " constant_names += [\"RelativeGainGotthard2\", \"BadPixelsFFGotthard2\"]\n", "\n", " g2_metadata = g2_cal.metadata(calibrations=constant_names)\n", + " # Display retrieved calibration constants timestamps\n", + " g2_cal.display_markdown_retrieved_constants(metadata=g2_metadata)\n", "\n", " # Validate the constants availability and raise/warn correspondingly.\n", " for mod, calibrations in g2_metadata.items():\n", @@ -381,7 +389,7 @@ " data_corr[index, ...],\n", " mask[index, ...],\n", " g,\n", - " const_data[mod][\"OffsetGotthard2\"],\n", + " const_data[mod][\"OffsetGotthard2\"].astype(np.float32), # PSI map is in f8\n", " const_data[mod][\"RelativeGainGotthard2\"], \n", " const_data[mod][\"Mask\"],\n", " apply_offset=offset_correction,\n", diff --git a/src/cal_tools/calcat_interface.py b/src/cal_tools/calcat_interface.py index db67afc900f82e1949dd2ef9ce37d76502a4eda4..b6fae338496ad62a1ddf33c3c6d768dcc1c8796e 100644 --- a/src/cal_tools/calcat_interface.py +++ b/src/cal_tools/calcat_interface.py @@ -1361,7 +1361,8 @@ class GOTTHARD2_CalibrationData(CalibrationData): """Calibration data for the Gotthard II detector.""" calibrations = { - "LUTGotthard2" "OffsetGotthard2", + "LUTGotthard2", + "OffsetGotthard2", "NoiseGotthard2", "BadPixelsDarkGotthard2", "RelativeGainGotthard2",