Resolve "nexus_writer: autof and manual saving how to solve link to images"
requested to merge 1899-nexus_writer-autof-and-manual-saving-how-to-solve-link-to-images into master
Closes #1899 (closed) #2890 (closed)
The autofilter patched acquisition objects have two lists of channels
-
acq_obj.device.channels
contains allOLD_CHAN
-
acq_obj.channels
contains allNEW_CHAN
This is what we are trying to achieve:
reading task --> OLD_CHAN.emit --new_data--> new_data_received --> NEW_CHAN.emit --new_data--> Publish in Redis
The Louie connections are made:
-
OLD_CHAN.emit --new_data--> new_data_received
: done on instantiation -
NEW_CHAN.emit --new_data--> Publish in Redis
: done by the scan object inScan._prepare_devices
The problem is that sometimes NEW_CHAN.emit
gets called and sometimes OLD_CHAN.emit
.
In this MR I try a different approach: patch the acquisition chain in-place (so we keep all original acquisition objects and channels). This mostly involves patching the emit
method of all channels to block emitting invalid points.