Skip to content
Snippets Groups Projects

[AGIPD] Split AGIPDCtrl function for clear code and adding tests later.

Merged Karim Ahmed requested to merge refactor/split_AGIPDCtrl_functions into master
+ 3
3
@@ -69,7 +69,7 @@ class AgipdCtrl:
return options[np.argmin(dists)]
def _get_acq_rate_ctrl(self) -> Optional[float]:
"""Get acquisition (repetition) rate from RUN source."""
"""Get acquisition (repetition) rate from CONTROL source."""
# Attempt to look for acquisition rate in slow data
rep_rate_src = (
self.ctrl_src, "bunchStructure.repetitionRate.value")
@@ -115,7 +115,7 @@ class AgipdCtrl:
return self._get_acq_rate_instr()
def _get_gain_setting_ctrl(self) -> Optional[int]:
"""Read gain_settings from RUN source and gain.value key."""
"""Read gain_settings from CONTROL source and gain.value key."""
return int(self.run_dc[self.ctrl_src, "gain.value"].as_single_value())
def _get_gain_setting_ctrl_old(self) -> Optional[int]:
@@ -158,7 +158,7 @@ class AgipdCtrl:
self,
creation_time: Optional[datetime] = None,
) -> Optional[int]:
"""Read Gain setting from RUN sources.
"""Read Gain setting from CONTROL sources.
if key `gain.value` is not available, calculate gain_setting from
setupr and patterTypeIndex. If it failed raise ValueError.
Loading