Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
nxtomomill
Commits
53b9cb42
Commit
53b9cb42
authored
Sep 02, 2021
by
Henri Payno
Browse files
[HDF5Config] add an option to check_tomo_n or not.
Checking it has no sense when create sequence from urls
parent
b222eb42
Changes
3
Hide whitespace changes
Inline
Side-by-side
nxtomomill/converter/hdf5/acquisition/standardacquisition.py
View file @
53b9cb42
...
...
@@ -1028,7 +1028,7 @@ class StandardAcquisition(BaseAcquisition):
# check scan is complete
tomo_n
=
self
.
_get_tomo_n
()
if
tomo_n
is
not
None
:
if
self
.
configuration
.
check_tomo_n
and
tomo_n
is
not
None
:
image_key_control
=
numpy
.
asarray
(
self
.
_image_key_control
)
proj_found
=
len
(
image_key_control
[
image_key_control
==
ImageKey
.
PROJECTION
.
value
]
...
...
nxtomomill/converter/hdf5/hdf5converter.py
View file @
53b9cb42
...
...
@@ -237,6 +237,8 @@ class _H5ToNxConverter(BaseConverter):
:return:
"""
self
.
configuration
.
check_tomo_n
=
False
# when building from urls `tomo_n` has no meaning
if
self
.
configuration
.
is_using_titles
:
raise
ValueError
(
"Configuration specify that titles should be used"
)
if
self
.
configuration
.
format
is
None
:
...
...
nxtomomill/io/config.py
View file @
53b9cb42
...
...
@@ -317,6 +317,9 @@ class TomoHDF5Config:
self
.
_data_grps_urls
=
tuple
()
self
.
_default_copy_behavior
=
False
# should we check for tomo_n contain in the init sequence
self
.
_check_tomo_n
=
True
# extra options
self
.
_param_already_defined
=
{}
...
...
@@ -790,6 +793,16 @@ class TomoHDF5Config:
"""
return
not
(
len
(
self
.
data_frame_grps
)
==
0
)
@
property
def
check_tomo_n
(
self
):
return
self
.
_check_tomo_n
@
check_tomo_n
.
setter
def
check_tomo_n
(
self
,
check
:
bool
):
if
not
isinstance
(
check
,
bool
):
raise
TypeError
(
"'check' is expected to be a boolean"
)
self
.
_check_tomo_n
=
check
def
clear_titles
(
self
):
"""
set all titles to empty tuple
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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