data structure of scan.scan_info[ acquisition_chain'] dict
currently it is difficult to get e.g. the counter entries (e.g. 'scalars' or 'images') from scan.scan_info[ acquisition_chain']
in a systematic way as the dict-keys are the names of the of the top-masters and therefore change between scans. In the code today we use next(iter(scan_info["acquisition_chain"]
to circumvent this problem to avoid using the unkown dict key. If instead of a dict acquisition_chain
would contain a list on the outer level there would not be such a problem.
{
'type': 'loopscan',
...
'acquisition_chain': {
'timer': { #<---- this key is the problem
'master': {
'scalars': ['timer:elapsed_time', 'timer:epoch'],
'scalars_units': {
'timer:elapsed_time': 's',
'timer:epoch': 's'
},
'spectra': [],
'images': [],
'display_names': {
'timer:elapsed_time': 'elapsed_time',
'timer:epoch': 'epoch'
}
},
'scalars': ['lima_simulator:roi_counters:r1:avg',
'lima_simulator:roi_counters:r1:max'],
'scalars_units': {
'lima_simulator:image': None,
'lima_simulator:roi_counters:r1:avg': None,
'lima_simulator:roi_counters:r1:max': None,
},
'spectra': [],
'images': ['lima_simulator:image'], # <-- to get here in a systematic way
'display_names': {
'lima_simulator:image': 'image',
'lima_simulator:roi_counters:r1:avg': 'r1:avg',
'lima_simulator:roi_counters:r1:max': 'r1:max',
}
}
}
}