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

Commit 233dcd50 authored by payno's avatar payno

[hdf5] fix test and get_sinogram since tomo_n has been updated

parent 47f89643
Pipeline #46117 failed with stages
in 12 minutes and 12 seconds
......@@ -943,7 +943,9 @@ class HDF5TomoScan(TomoScanBase):
@docstring(TomoScanBase)
def get_sinogram(self, line, subsampling=1) -> numpy.array:
if (
self.tomo_n is not None and self.dim_2 is not None and line > self.dim_2
len(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))
......
......@@ -182,7 +182,7 @@ class TestHDF5Scan(HDF5TestBaseClass):
def testAxisUtils(self):
self.assertEqual(self.scan.scan_range, 180)
self.assertEqual(self.scan.tomo_n, 1500)
self.assertEqual(len(self.scan.projections), 1500)
radios_urls_evolution = self.scan.get_proj_angle_url()
self.assertEqual(len(radios_urls_evolution), 1503)
......@@ -193,7 +193,7 @@ class TestHDF5Scan(HDF5TestBaseClass):
)
def testDarkRefUtils(self):
self.assertEqual(self.scan.tomo_n, 1500)
self.assertEqual(len(self.scan.projections), 1500)
pixel_size = self.scan.pixel_size
self.assertTrue(pixel_size is not None)
self.assertTrue(
......
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