Commit 53b9cb42 authored by Henri Payno's avatar 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
......@@ -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]
......
......@@ -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:
......
......@@ -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
......
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