Skip to content
Snippets Groups Projects
Commit 51a7d4b7 authored by Egor Sobolev's avatar Egor Sobolev Committed by Philipp Schmidt
Browse files

Update ShimadzuHPVX2 conditions, add copy_keys in ShimadzuHPVX2 detector

parent 8b07d324
No related branches found
No related tags found
1 merge request!939[Generic][Shimadzu] Dynamic flat-field characterization and correction for MHz microscopy
......@@ -837,3 +837,13 @@ class DSSCConditions(ConditionsBase):
"Offset": _params,
"Noise": _params,
}
@dataclass
class ShimadzuHPVX2Conditions(ConditionsBase):
burst_frame_count: float
calibration_types = {
'Offset': ['Burst Frame Count'],
'DynamicFF': ['Burst Frame Count'],
}
from dataclasses import dataclass
from cal_tools.calcat_interface2 import ConditionsBase
@dataclass
class ShimadzuHPVX2Conditions(ConditionsBase):
frame_size: float
calibration_types = {
"Offset": ["Frame Size"],
"DynamicFF": ["Frame Size"],
}
from cal_tools.calcat_interface2 import ShimadzuHPVX2Conditions
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 +38,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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment