GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 1100631d authored by payno's avatar payno

[hdf5] fix get_sinogram which was using tomo_n instead of 'projections'

parent 4e857723
Pipeline #46108 failed with stages
in 10 minutes and 1 second
......@@ -468,13 +468,15 @@ class TomoScanBase:
:rtype: numpy.array
"""
if (
self.tomo_n is not None and self.dim_2 is not None and line > self.dim_2
self.projections is not None
and self.dim_2 is not None
and line > self.dim_2
) or line < 0:
raise ValueError("requested line {} is not in the scan".format(line))
if self.projections is not None:
dim1, dim2 = self.dim_1, self.dim_2
y_dim = ceil(self.tomo_n / subsampling)
y_dim = ceil(len(self.projections) / subsampling)
sinogram = numpy.empty((y_dim, dim1))
_logger.debug(
"compute sinogram for line {} of {} (subsampling: {})".format(
......@@ -485,7 +487,7 @@ class TomoScanBase:
name="compute sinogram for {}, line={},"
"sampling={}".format(os.path.basename(self.path), line, subsampling)
)
advancement.setMaxAdvancement(self.tomo_n)
advancement.setMaxAdvancement(len(self.projections))
projections = self.projections
o_keys = list(projections.keys())
o_keys.sort()
......
Markdown is supported
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