name collision in acq channel names
trying to build scans that are a bit non standard I realized that there can be collisions on acq channel names in the scan!
Take this (awkward) example:
TEST_SESSION [30]: from bliss.scanning.scan import Scan
...: from bliss.controllers.lima.roi import Roi
...: lima_sim = config.get("lima_simulator")
...: lima_sim2 = config.get("lima_simulator2")
...: r2 = Roi(100, 100, 100, 200)
...: lima_sim2.roi_counters['r2']=r2
...: lima_sim.roi_counters['r2']=r2
...: l2=ascan(roby,0,1,5,.1,lima_sim2,diode2,run=False)
...: l1=ascan(robz,0,1,5,.1,lima_sim,diode,run=False)
...: ac1=l1.acq_chain
...: ac2=l2.acq_chain
...: def add_to_chain(chain1,chain2,node):
...: for child in chain2._tree.children(node):
...: if child.bpointer == 'root':
...: chain1.add(child.identifier)
...: else:
...: chain1.add(node,child.identifier)
...: add_to_chain(chain1,chain2,child.identifier)
...: a=ac2._tree.children('root')[0].identifier
...: a._AcquisitionObject__name="myaxis"
...: a.terminator=False
...: add_to_chain(ac1,ac2,ac2._tree.root)
...: ac1._tree.show()
...: myscan = Scan(ac1)
...: myscan.run()
the resulting acq-tree looks like this:
├── axis
│ └── timer
│ ├── lima_simulator
│ │ └── roi_counters
│ └── simulation_diode_sampling_controller
└── myaxis
└── timer
├── lima_simulator2
│ └── roi_counters
└── simulation_diode_sampling_controller
the channels emitted from both timers are called timer:elapsed_time
and timer:epoch
. Seems like we are missing a mechanism (probably on Scan.__init__
) that assures unique channel names in the chain.