Skip to content
Snippets Groups Projects

[AGIPD][CORRECT] Use calcat_interface and remove precorrection notebook

Merged Karim Ahmed requested to merge AGIPD_calcat_interface into master
1 file
+ 5
3
Compare changes
  • Side-by-side
  • Inline
@@ -181,7 +181,6 @@ class CalCatApi(metaclass=ClientWrapper):
else:
raise ValueError(f"{module_naming} is unknown!")
@lru_cache()
def calibration_id(self, calibration_name):
"""ID for a calibration in CalCat."""
@@ -956,10 +955,13 @@ class AGIPD_CalibrationData(SplitConditionCalibrationData):
def _build_condition(self, parameters):
cond = super()._build_condition(parameters)
# Fix-up some database quirks.
if int(cond.get("Gain mode", -1)) == 0:
gain_mode = cond.get("Gain mode", None)
if gain_mode is not None and int(gain_mode) == 0:
del cond["Gain mode"]
elif gain_mode is not None:
cond["Gain mode"] = 1
if int(cond.get("Integration time", -1)) == 12:
del cond["Integration time"]
Loading