Commit 941c2953 authored by Wout De Nolf's avatar Wout De Nolf
Browse files

add pixel size and description to lima scan metadata

parent 06cfec04
Pipeline #51800 passed with stages
in 109 minutes and 1 second
......@@ -144,7 +144,18 @@ class Lima(CounterController, HasMetadataForScanExclusive):
)
def scan_metadata(self) -> dict:
return {"type": "lima", "camera_settings": self.camera.to_dict()}
description = f"{self.proxy.lima_type}, {self.proxy.camera_model}"
camera_settings = self.camera.to_dict()
px, py = self.proxy.camera_pixelsize
return {
"type": "lima",
"description": description,
"x_pixel_size": px,
"y_pixel_size": py,
"x_pixel_size@units": "m",
"y_pixel_size@units": "m",
"camera_settings": camera_settings,
}
@property
def disable_bpm(self):
......
......@@ -1196,6 +1196,9 @@ def expected_detector_content(name, config=True, save_images=True):
"acq_parameters",
"ctrl_parameters",
"camera_settings",
"description",
"x_pixel_size",
"y_pixel_size",
}
else:
datasets = {
......@@ -1203,6 +1206,9 @@ def expected_detector_content(name, config=True, save_images=True):
"acq_parameters",
"ctrl_parameters",
"camera_settings",
"description",
"x_pixel_size",
"y_pixel_size",
}
elif name.startswith("simu1_") or name.startswith("simu2_"):
datasets = {"data", "type"}
......@@ -1226,6 +1232,9 @@ def expected_detector_content(name, config=True, save_images=True):
"ctrl_parameters",
"camera_settings",
"type",
"description",
"x_pixel_size",
"y_pixel_size",
}
else:
datasets = {
......@@ -1233,6 +1242,9 @@ def expected_detector_content(name, config=True, save_images=True):
"ctrl_parameters",
"camera_settings",
"type",
"description",
"x_pixel_size",
"y_pixel_size",
}
elif name == "image":
if save_images:
......@@ -1242,6 +1254,9 @@ def expected_detector_content(name, config=True, save_images=True):
"ctrl_parameters",
"camera_settings",
"type",
"description",
"x_pixel_size",
"y_pixel_size",
}
else:
datasets = {
......@@ -1249,6 +1264,9 @@ def expected_detector_content(name, config=True, save_images=True):
"ctrl_parameters",
"camera_settings",
"type",
"description",
"x_pixel_size",
"y_pixel_size",
}
elif re.match("roi[1-3]_(sum|avg|std|min|max)", name):
datasets = {"data", "roi1", "roi2", "roi3"}
......
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