scan_info: refactoring of `acquisition_chain` entry
Here is a proposal to expose in different way the acquisition_chain
displayed in scan_info
.
Here is an example:
{'acquisition_chain': {'timer': {'display_names': {'diode:diode': 'diode',
'images': [],
'master': {'display_names': {'timer:elapsed_time': 'elapsed_time',
'timer:epoch': 'epoch'},
'images': [],
'scalars': ['timer:elapsed_time',
'timer:epoch'],
'scalars_units': {'timer:elapsed_time': 's',
'timer:epoch': 's'},
'spectra': []},
'scalars': ['diode:diode'],
'scalars_units': {'diode:diode': None,
'spectra': []}},
I think it would be more easy to expose as a set of metadata per channels. Easier to understand, easier to expand. A description of the objects and then the relations between the objects.
'channels': {
'diode:diode': {
'display_name': 'diode',
'scalars_unit': None
'kind': 'scalar' # or 'image' or 'spectra'...
'device': 'diode' # The device name could specified, I assume that the device is 'diode' from the id 'diode:diode'
},
'timer:elapsed_time': {
'display_name': 'elapsed_time',
'scalars_unit': 's'
'kind': 'scalar'
},
'timer:epoch': {
'display_name': 'epoch',
'scalars_unit': 's'
'kind': 'scalar'
},
'axis:roby': {
'display_name': 'roby',
'scalars_unit': None
'kind': 'scalar'
'master': True
},
}
The scan_info
also provides start
and stop
for masters. I think it would be helpful to add the mapping here, anyway it is a dup.
masters = ['axis:roby']
start = [0]
stop = [1]
Finally if you like, you could expose the real acquisition chain. I understand it is device based. It could be something like that.
'acquisition_chain': [
('axis', [('timer', ['diode'])])
]
Edited by Linus Pithan