Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
kmap
xsocs
Commits
1fdc7245
Commit
1fdc7245
authored
Jul 17, 2018
by
Thomas Vincent
Browse files
add read/write of image roi offset in hdf5 file
parent
ca9184d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
xsocs/io/XsocsH5.py
View file @
1fdc7245
...
...
@@ -142,6 +142,17 @@ class XsocsH5(XsocsH5Base):
return
self
.
__detector_params
(
entry
,
[
'chan_per_deg_dim0'
,
'chan_per_deg_dim1'
])
@
_process_entry
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'
)
@
_process_entry
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
,
entry
,
motor_0
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment