From 454550b82cc4e21c6d06d3275e080a1228b08d68 Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Fri, 14 Nov 2025 14:20:47 +0100 Subject: [PATCH] fix(waveform_sim): added signal to emit 0D data --- ophyd_devices/sim/sim_waveform.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ophyd_devices/sim/sim_waveform.py b/ophyd_devices/sim/sim_waveform.py index 05d04e3..89ceacd 100644 --- a/ophyd_devices/sim/sim_waveform.py +++ b/ophyd_devices/sim/sim_waveform.py @@ -90,6 +90,7 @@ class SimWaveform(Device): compute_readback=True, kind=Kind.hinted, ) + waveform_0d = Cpt(AsyncSignal, name="waveform_0d", ndim=0, max_size=1000, kind=Kind.hinted) data = Cpt(AsyncSignal, name="data", ndim=1, max_size=1000) # Can be extend or append async_update = Cpt(AsyncUpdateSignal, value="add", kind=Kind.config) @@ -151,6 +152,9 @@ class SimWaveform(Device): Here, we also run a callback on SUB_MONITOR to send the image data the device_monitor endpoint in BEC. """ status = DeviceStatus(self) + self.waveform_0d.put( + np.random.randint(0, 100), async_update={"type": "add", "max_shape": [None]} + ) def acquire(status: DeviceStatus): try: @@ -247,7 +251,6 @@ class SimWaveform(Device): is published to the device_monitor endpoint in REDIS. """ if self._staged is Staged.yes: - return super().stage() self.file_path.set( os.path.join(