get_acq_metadata of counters not at the right place
Today the generic code to gather counters metadata is in BaseCounterAcquisitionSlave
so it only affect sampling and integrating counters.
The following piece of code should be moved to AcquisitionSlave
class or { AcquisitionObject
+ checking AcquisitionMaster
implementation }
def get_acquisition_metadata(self, timing=None):
tmp_dict = super().get_acquisition_metadata(timing=timing)
if timing != self.META_TIMING.PREPARED:
return tmp_dict
for cnt in self._counters:
if isinstance(cnt, HasMetadataForScan):
mdata = cnt.scan_metadata()
if mdata is not None:
if tmp_dict is None:
tmp_dict = dict()
deep_update(tmp_dict, mdata)
return tmp_dict
Also, this deep_update(tmp_dict, mdata)
is not good because if 2 counters have the same keys in scan_metadata they are overwritten when
added to the scan_metadata of the device owning counters.
It should be tmp_dict[cnt.name]=mdata
instead