Default chain in scan is not DEFAULT_CHAIN in session
def limatake_mg(expotime, nbframes=1, save=False, **kwargs):
scan_info = {
"npoints": nbframes,
"count_time": expotime,
"type": kwargs.get("type", "loopscan"),
"save": save,
"title": kwargs.get("title","limatake"),
"sleep_time": kwargs.get("sleep_time"),
"start": [],
"stop": [],
"saving_statistics_history": int(nbframes),
}
chain = DEFAULT_CHAIN.get(scan_info, [])
print (chain)
limaused = list()
builder = ChainBuilder([])
for node in builder.get_nodes_by_controller_type(Lima):
limaused.append(node.controller)
scan = Scan(
chain,
scan_info=scan_info,
name=kwargs.setdefault("name", "limatake"),
save=save,
data_watch_callback=StepScanDataWatch(),
)
print (scan.acq_chain._tree)
scan.run()
The result is:
JENS [2]: limatake_mg (0.1, 10, saving_frame_per_file=5, save=True)
<bliss.scanning.chain.AcquisitionChain object at 0x7f18af374a50>
acquisition chain
└── timer
├── basler1
├── simulation_counter_controller
└── simulation_diode_sampling_controller
Scan 162 Mon Nov 18 09:53:31 2019 /data/id19/inhouse/clemence/jens/tomo.h5 jens user = blissadm
limatake
Preparing basler1 ...
Running ...
SIMULATION_COUNTER_ACQ_DEV -- (Theorical values) simulation_counter_controller mu=5 sigma=1.66667 fwhm=3.9247
basler1 acq #10 save #10
Finished (took 0:00:03.845194)
JENS [3]: DEFAULT_CHAIN
Out [3]: <bliss.scanning.toolbox.DefaultAcquisitionChain object at 0x7f18b0210a90>
JENS [4]:
Edited by Matias Guijarro