Commit 1fdc7245 authored by Thomas Vincent's avatar Thomas Vincent
Browse files

add read/write of image roi offset in hdf5 file

parent ca9184d1
......@@ -142,6 +142,17 @@ class XsocsH5(XsocsH5Base):
return self.__detector_params(entry, ['chan_per_deg_dim0',
def image_roi_offset(self, entry):
"""Image ROI offset that was saved in the hdf5 file
:param str entry: Entry from which to retrieve the information
:return: ROI offset (row_offset, column)
:rtype: Union[List[int],None]
return self.__detector_params(entry, 'image_roi_offset')
def n_images(self, entry):
# TODO : make sure that data.ndims = 3
......@@ -342,6 +353,15 @@ class XsocsH5Writer(XsocsH5):
'chan_per_deg_dim1': chan_per_deg[1]}
return self.__set_detector_params(entry, value)
def set_image_roi_offset(self, offset, entry):
"""Store image ROI offset information in the hdf5 file
:param List[int] offset:
Offset of the ROI in pixels (row_offset, column_offset)
:param str entry: Entry for which to store information
return self.__set_detector_params(entry, {'image_roi_offset': offset})
def set_scan_params(self,
Supports Markdown
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