From 146ac915f8ec4ced346d860e2c09326ffb7e68ff Mon Sep 17 00:00:00 2001 From: appel_c Date: Tue, 23 Jun 2026 14:57:11 +0200 Subject: [PATCH] fix(bpm): fix input device config for bpm.BPM --- csaxs_bec/device_configs/bl_endstation.yaml | 8 ++++---- csaxs_bec/device_configs/bl_frontend.yaml | 8 ++++---- csaxs_bec/device_configs/bl_optics_hutch.yaml | 8 ++++---- csaxs_bec/device_configs/test_config.yaml | 8 ++++---- csaxs_bec/devices/pseudo_devices/bpm.py | 16 ++++++++-------- tests/tests_devices/test_pseudo_devices.py | 16 ++++++++-------- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/csaxs_bec/device_configs/bl_endstation.yaml b/csaxs_bec/device_configs/bl_endstation.yaml index c84b8e7..4f42bf4 100644 --- a/csaxs_bec/device_configs/bl_endstation.yaml +++ b/csaxs_bec/device_configs/bl_endstation.yaml @@ -1051,10 +1051,10 @@ bpm_xbox2_slowrb: description: BPM Xbox 2 (First Xbox in ES hutch) readback deviceClass: csaxs_bec.devices.pseudo_devices.bpm.BPM deviceConfig: - left_top: galilrioesxbox.analog_in.ch0 - right_top: galilrioesxbox.analog_in.ch1 - right_bot: galilrioesxbox.analog_in.ch2 - left_bot: galilrioesxbox.analog_in.ch3 + left_top_ref: galilrioesxbox.analog_in.ch0 + right_top_ref: galilrioesxbox.analog_in.ch1 + right_bot_ref: galilrioesxbox.analog_in.ch2 + left_bot_ref: galilrioesxbox.analog_in.ch3 enabled: true readoutPriority: monitored onFailure: retry diff --git a/csaxs_bec/device_configs/bl_frontend.yaml b/csaxs_bec/device_configs/bl_frontend.yaml index 5d21752..ee40118 100644 --- a/csaxs_bec/device_configs/bl_frontend.yaml +++ b/csaxs_bec/device_configs/bl_frontend.yaml @@ -203,10 +203,10 @@ bpm1: description: 'XBPM1 (frontend)' deviceClass: csaxs_bec.devices.pseudo_devices.bpm.BPM deviceConfig: - left_top: xbpm1c1 - right_top: xbpm1c2 - right_bot: xbpm1c3 - left_bot: xbpm1c4 + left_top_ref: xbpm1c1 + right_top_ref: xbpm1c2 + right_bot_ref: xbpm1c3 + left_bot_ref: xbpm1c4 onFailure: raise enabled: true readoutPriority: monitored diff --git a/csaxs_bec/device_configs/bl_optics_hutch.yaml b/csaxs_bec/device_configs/bl_optics_hutch.yaml index fe46d79..3b339ff 100644 --- a/csaxs_bec/device_configs/bl_optics_hutch.yaml +++ b/csaxs_bec/device_configs/bl_optics_hutch.yaml @@ -368,10 +368,10 @@ galilrioop: # description: BPM Xbox 1 (OP hutch) readback # deviceClass: csaxs_bec.devices.pseudo_devices.bpm.BPM # deviceConfig: -# left_top: galilrioop.analog_in.ch0 -# right_top: galilrioop.analog_in.ch1 -# right_bot: galilrioop.analog_in.ch2 -# left_bot: galilrioop.analog_in.ch3 +# left_top_ref: galilrioop.analog_in.ch0 +# right_top_ref: galilrioop.analog_in.ch1 +# right_bot_ref: galilrioop.analog_in.ch2 +# left_bot_ref: galilrioop.analog_in.ch3 # enabled: true # readoutPriority: monitored # onFailure: retry diff --git a/csaxs_bec/device_configs/test_config.yaml b/csaxs_bec/device_configs/test_config.yaml index 3df835a..b269875 100644 --- a/csaxs_bec/device_configs/test_config.yaml +++ b/csaxs_bec/device_configs/test_config.yaml @@ -12,10 +12,10 @@ bpm1: readoutPriority: baseline deviceClass: csaxs_bec.devices.pseudo_devices.bpm.BPM deviceConfig: - blade_t: galilrioesxbox.analog_in.ch0 - blade_r: galilrioesxbox.analog_in.ch1 - blade_b: galilrioesxbox.analog_in.ch2 - blade_l: galilrioesxbox.analog_in.ch3 + left_top_ref: galilrioesxbox.analog_in.ch0 + right_top_ref: galilrioesxbox.analog_in.ch1 + right_bot_ref: galilrioesxbox.analog_in.ch2 + left_bot_ref: galilrioesxbox.analog_in.ch3 enabled: true readOnly: false softwareTrigger: true diff --git a/csaxs_bec/devices/pseudo_devices/bpm.py b/csaxs_bec/devices/pseudo_devices/bpm.py index a6c22b7..74aad13 100644 --- a/csaxs_bec/devices/pseudo_devices/bpm.py +++ b/csaxs_bec/devices/pseudo_devices/bpm.py @@ -72,10 +72,10 @@ class BPM(PSIPseudoDeviceBase): def __init__( self, name, - left_top: str, - right_top: str, - right_bot: str, - left_bot: str, + left_top_ref: str, + right_top_ref: str, + right_bot_ref: str, + left_bot_ref: str, device_manager=None, scan_info=None, **kwargs, @@ -83,16 +83,16 @@ class BPM(PSIPseudoDeviceBase): super().__init__(name=name, device_manager=device_manager, scan_info=scan_info, **kwargs) # Get all blade signal objects from utility method signal_t = self.left_top.get_device_object_from_bec( - object_name=left_top, signal_name=self.name, device_manager=device_manager + object_name=left_top_ref, signal_name=self.name, device_manager=device_manager ) signal_r = self.right_top.get_device_object_from_bec( - object_name=right_top, signal_name=self.name, device_manager=device_manager + object_name=right_top_ref, signal_name=self.name, device_manager=device_manager ) signal_b = self.right_bot.get_device_object_from_bec( - object_name=right_bot, signal_name=self.name, device_manager=device_manager + object_name=right_bot_ref, signal_name=self.name, device_manager=device_manager ) signal_l = self.left_bot.get_device_object_from_bec( - object_name=left_bot, signal_name=self.name, device_manager=device_manager + object_name=left_bot_ref, signal_name=self.name, device_manager=device_manager ) # Set compute methods for blade signals and virtual signals diff --git a/tests/tests_devices/test_pseudo_devices.py b/tests/tests_devices/test_pseudo_devices.py index 60c59a2..632fa92 100644 --- a/tests/tests_devices/test_pseudo_devices.py +++ b/tests/tests_devices/test_pseudo_devices.py @@ -150,10 +150,10 @@ def bpm(patched_dm_bpm): enabled=True, readoutPriority="baseline", deviceConfig={ - "left_top": "left_top", - "right_top": "right_top", - "right_bot": "right_bot", - "left_bot": "left_bot", + "left_top_ref": "left_top", + "right_top_ref": "right_top", + "right_bot_ref": "right_bot", + "left_bot_ref": "left_bot", }, needs=["left_top", "right_top", "right_bot", "left_bot"], ) @@ -161,10 +161,10 @@ def bpm(patched_dm_bpm): try: bpm = BPM( name=name, - left_top="left_top", - right_top="right_top", - right_bot="right_bot", - left_bot="left_bot", + left_top_ref="left_top", + right_top_ref="right_top", + right_bot_ref="right_bot", + left_bot_ref="left_bot", device_manager=patched_dm_bpm, ) patched_dm_bpm.devices._add_device(bpm.name, bpm)