diff --git a/src/calng/corrections/Gotthard2Correction.py b/src/calng/corrections/Gotthard2Correction.py index e35c4b59c08a0ff7b05fe5644acc5786d6eabd89..e9700dc1757eac4817082da260f52e367474a175 100644 --- a/src/calng/corrections/Gotthard2Correction.py +++ b/src/calng/corrections/Gotthard2Correction.py @@ -148,24 +148,14 @@ class Gotthard2CalcatFriend(base_calcat.BaseCalcatFriend): def __init__(self, device, *args, **kwargs): super().__init__(device, *args, **kwargs) - self._constants_need_conditions = { - Constants.LUTGotthard2: self.condition_2, - Constants.OffsetGotthard2: self.condition_1, - Constants.RelativeGainGotthard2: self.condition_2, - Constants.BadPixelsDarkGotthard2: self.condition_1, - Constants.BadPixelsFFGotthard2: self.condition_2, - } + self._constants_need_conditions = {c: self.condition for c in Constants} - def condition_1(self): + def condition(self): res = base_calcat.OperatingConditions() res["Exposure time"] = self._get_param("exposureTime") res["Exposure period"] = self._get_param("exposurePeriod") res["Sensor Bias Voltage"] = self._get_param("biasVoltage") res["Single photon"] = self._get_param("singlePhoton") - return res - - def condition_2(self): - res = self.condition_1() res["Acquisition rate"] = self._get_param("acquisitionRate") return res