Adding a subscription to the array_data from #20

Closed
opened 2025-05-08 16:21:41 +02:00 by appel_c · 4 comments
appel_c commented 2025-05-08 16:21:41 +02:00 (Migrated from gitlab.psi.ch)

Adding a callback to the array_data signal from the ImagePluging, adds in addition a _read_value callback for the event=SUB.VALUE (https://github.com/bluesky/ophyd/blob/main/ophyd/signal.py#L1313).

As a consequence, pyepics will add these callbacks to the PV for every change event (https://pyepics.github.io/pyepics/pv.html#pv.add_callback). A direct consequence is that this will send data through the network. We've experienced that adding 3 cameras (running at 50Hz) on the device server will trigger callbacks at this rate, and thereby significantly increase the network traffic. An alternative solution to the following implementation is needed to not overflow the network with image data exchange:
(https://gitlab.psi.ch/bec/debye_bec/-/blob/main/debye_bec/devices/cameras/basler_cam.py?ref_type=heads)

self.image1.array_data.subscribe(self.emit_to_bec)
Adding a callback to the `array_data` signal from the ImagePluging, adds in addition a `_read_value` callback for the `event=SUB.VALUE` (https://github.com/bluesky/ophyd/blob/main/ophyd/signal.py#L1313). As a consequence, pyepics will add these callbacks to the PV for every change event (https://pyepics.github.io/pyepics/pv.html#pv.add_callback). A direct consequence is that this will send data through the network. We've experienced that adding 3 cameras (running at 50Hz) on the device server will trigger callbacks at this rate, and thereby significantly increase the network traffic. An alternative solution to the following implementation is needed to not overflow the network with image data exchange: (https://gitlab.psi.ch/bec/debye_bec/-/blob/main/debye_bec/devices/cameras/basler_cam.py?ref_type=heads) ```python self.image1.array_data.subscribe(self.emit_to_bec) ```
appel_c commented 2025-05-08 16:21:41 +02:00 (Migrated from gitlab.psi.ch)

assigned to @appel_c

assigned to @appel_c
appel_c commented 2025-05-08 16:22:33 +02:00 (Migrated from gitlab.psi.ch)

changed the description

changed the description
appel_c commented 2025-05-12 08:37:09 +02:00 (Migrated from gitlab.psi.ch)

mentioned in merge request !30

mentioned in merge request !30
appel_c (Migrated from gitlab.psi.ch) closed this issue 2025-05-16 15:16:45 +02:00
appel_c commented 2025-05-27 14:46:47 +02:00 (Migrated from gitlab.psi.ch)

mentioned in issue #21

mentioned in issue #21
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bec/debye_bec#20