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
+ 93
74
Compare changes
  • Side-by-side
  • Inline
@@ -176,7 +176,7 @@ class CalCatApi(metaclass=ClientWrapper):
for pdu in resp_pdus["data"]
}
else:
raise ValueError(f"{module_naming} is unknown!")
raise ValueError(f"{module_naming} is unknown!. Expected da, modno, or qm")
@lru_cache()
@@ -728,7 +728,7 @@ class CalibrationData:
table = [["Modules"] + cal_group]
# Loop over calibrations and modules to form the next rows.
for mod in list(self.mod_to_pdu):
for mod in metadata:
mod_consts = []
for cname in cal_group:
@@ -1037,10 +1037,12 @@ class AGIPD_CalibrationData(SplitConditionCalibrationData):
cond = super()._build_condition(parameters)
# Fix-up some database quirks.
if int(cond.get("Gain mode", -1)) == 0:
del cond["Gain mode"]
if cond.get("Gain mode", None):
cond["Gain mode"] = 1
else:
cond.pop("Gain mode", None)
if int(cond.get("Integration time", -1)) == 12:
if cond.get("Integration time", None) == 12:
del cond["Integration time"]
return cond
Loading