Adding a subscription to the array_data from
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)