From 2c8293d2bbe162dd6a398f709d502da7e71806ef Mon Sep 17 00:00:00 2001 From: appel_c Date: Thu, 5 Mar 2026 10:29:48 +0100 Subject: [PATCH] fix(panda-box): Receive PandaBox data as scaled (scale and offset applied) data. --- ophyd_devices/devices/panda_box/panda_box.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ophyd_devices/devices/panda_box/panda_box.py b/ophyd_devices/devices/panda_box/panda_box.py index 50772ad..7b4ec30 100644 --- a/ophyd_devices/devices/panda_box/panda_box.py +++ b/ophyd_devices/devices/panda_box/panda_box.py @@ -437,7 +437,11 @@ class PandaBox(PSIDeviceBase): ): try: # Timeout is needed to periodically check if we should leave the loop. - for data in client.data(scaled=False, frame_timeout=0.1): + # IMPORTANT: Keep scaled=True to receive the data properly scaled and not in + # raw format. If performance becomes an issue, this should be re-evaluated. + # One could directly connect to the Socket, however, this should not be relevant + # in the kHz range, maybe in the several MHz range. + for data in client.data(scaled=True, frame_timeout=0.1): if not self._run_data_readout_step(data): return # finally executes still except socket.timeout: