From 6b200f081cbed96b06088ba21ae6797a97426d2e Mon Sep 17 00:00:00 2001 From: Egor Sobolev <egor.sobolev@xfel.eu> Date: Thu, 28 Mar 2024 20:19:32 +0100 Subject: [PATCH] Update ShimadzuHPVX2 conditions, add copy_keys in ShimadzuHPVX2 detector --- src/cal_tools/shimadzu.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/cal_tools/shimadzu.py b/src/cal_tools/shimadzu.py index 8366c95b5..00b6cad30 100644 --- a/src/cal_tools/shimadzu.py +++ b/src/cal_tools/shimadzu.py @@ -1,20 +1,30 @@ from dataclasses import dataclass + from cal_tools.calcat_interface2 import ConditionsBase @dataclass class ShimadzuHPVX2Conditions(ConditionsBase): - frame_size: float + burst_frame_count: float calibration_types = { - "Offset": ["Frame Size"], - "DynamicFF": ["Frame Size"], + 'Offset': ['Burst Frame Count'], + 'DynamicFF': ['Burst Frame Count'], } class ShimadzuHPVX2: channel = "daqOutput" image_key = "data.image.pixels" + copy_keys = [ + "data.image.binning", + "data.image.dimTypes", + "data.image.dims", + "data.image.flipX", + "data.image.flipY", + "data.image.roiOffsets", + "data.image.rotation", + ] def __init__(self, source_name_pattern: str, channel=None, image_key=None): self.source_name_pattern = source_name_pattern @@ -38,7 +48,7 @@ class ShimadzuHPVX2: source_name = self.instrument_source(module) keydata = dc[source_name, self.image_key] num_frames = keydata.shape[-3] - return ShimadzuHPVX2Conditions(frame_size=num_frames / 256) + return ShimadzuHPVX2Conditions(burst_frame_count=float(num_frames)) def instrument_source(self, module: int): source_name = self.source_name_pattern.format(module) -- GitLab