Skip to content
Snippets Groups Projects
Commit d49bcc34 authored by Karim Ahmed's avatar Karim Ahmed
Browse files

add calcat_interface file for the tests to run

parent 3c818b4a
No related branches found
No related tags found
1 merge request!774[AGIPD][CORRECT] Use calcat_interface and remove precorrection notebook
...@@ -178,7 +178,6 @@ class CalCatApi(metaclass=ClientWrapper): ...@@ -178,7 +178,6 @@ class CalCatApi(metaclass=ClientWrapper):
else: else:
raise ValueError(f"{module_naming} is unknown!") raise ValueError(f"{module_naming} is unknown!")
@lru_cache() @lru_cache()
def calibration_id(self, calibration_name): def calibration_id(self, calibration_name):
"""ID for a calibration in CalCat.""" """ID for a calibration in CalCat."""
...@@ -1035,10 +1034,13 @@ class AGIPD_CalibrationData(SplitConditionCalibrationData): ...@@ -1035,10 +1034,13 @@ class AGIPD_CalibrationData(SplitConditionCalibrationData):
def _build_condition(self, parameters): def _build_condition(self, parameters):
cond = super()._build_condition(parameters) cond = super()._build_condition(parameters)
# Fix-up some database quirks. # 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"] del cond["Gain mode"]
elif gain_mode is not None:
cond["Gain mode"] = 1
if int(cond.get("Integration time", -1)) == 12: if int(cond.get("Integration time", -1)) == 12:
del cond["Integration time"] del cond["Integration time"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment