Skip to content
Snippets Groups Projects
Commit 1c172dca authored by David Hammer's avatar David Hammer
Browse files

Use same condition for all constants

parent 93690d4f
No related branches found
No related tags found
1 merge request!25GH2: CalCat support and updates for next run
......@@ -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
......
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