Commit a576bc07 authored by Linus Pithan's avatar Linus Pithan Committed by Matias Guijarro
Browse files

make use of fill_meta in lima to save rois and acq. parameters in hdf5

parent d0d8e83a
......@@ -36,6 +36,9 @@ class Roi(object):
def __repr__(self):
return "<%s,%s> <%s x %s>" % (self.x, self.y, self.width, self.height)
def to_dict(self):
return {"x": self.x, "y": self.y, "width": self.width, "height": self.height}
def __eq__(self, other):
return self.p0 == other.p0 and self.p1 == other.p1 and ==
......@@ -314,3 +314,18 @@ class LimaAcquisitionMaster(AcquisitionMaster):
if self._reading_task is None:
return True
return self._reading_task.get()
def fill_meta_at_scan_end(self, scan_meta):
self, { {"lima_parameters": self.parameters}}
def fill_meta_at_scan_init(self, scan_meta):
rois = dict(self.channels[0].acq_device.master_controller.roi_counters)
roi_counters = dict()
for roi_name, roi in rois.items():
roi_counters[roi_name] = roi.to_dict()
scan_meta.instrument.set(self, { {"roi_counters": roi_counters}})
except Exception:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment