From 78765100bada2afebea8f3b6c266859d53af341d Mon Sep 17 00:00:00 2001 From: Christian Appel Date: Mon, 23 Oct 2023 10:45:34 +0200 Subject: [PATCH] refactor: pilatus bugfix --- ophyd_devices/epics/devices/pilatus_csaxs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ophyd_devices/epics/devices/pilatus_csaxs.py b/ophyd_devices/epics/devices/pilatus_csaxs.py index cb6ca40..58930a0 100644 --- a/ophyd_devices/epics/devices/pilatus_csaxs.py +++ b/ophyd_devices/epics/devices/pilatus_csaxs.py @@ -177,10 +177,10 @@ class PilatusCsaxs(DetectorBase): factor = 1 if self.cam.threshold_energy._metadata["units"] == "eV": factor = 1000 - setp_energy = int(self.mokev * factor) + setpoint = int(self.mokev * factor) threshold = self.cam.threshold_energy.read()[self.cam.threshold_energy.name]["value"] - if not np.isclose(setp_energy / 2, threshold, rtol=0.05): - self.cam.threshold_energy.set(setp_energy / 2) + if not np.isclose(setpoint / 2, threshold, rtol=0.05): + self.cam.threshold_energy.set(setpoint / 2) def _set_acquisition_params(self) -> None: """set acquisition parameters on the detector"""