Commit c3cf2061 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Add test for projections_compacted

parent d16d6356
Pipeline #22957 failed with stages
in 1 minute and 3 seconds
...@@ -202,6 +202,21 @@ class TestHDF5Scan(HDF5TestBaseClass): ...@@ -202,6 +202,21 @@ class TestHDF5Scan(HDF5TestBaseClass):
self.assertTrue(numpy.isclose(self.scan.get_distance(unit='cm'), -1997.35)) self.assertTrue(numpy.isclose(self.scan.get_distance(unit='cm'), -1997.35))
def testCompactedProjs(self):
projs_compacted = self.scan.projections_compacted
self.assertTrue(projs_compacted.keys() == self.scan.projections.keys())
# ~ print(set(map(str, list(projs_compacted.values()))))
for i in range(22, 1520+1):
self.assertTrue(
projs_compacted[i].data_slice() == slice(22, 1521, None)
)
for i in range(1542, 1543):
self.assertTrue(
projs_compacted[i].data_slice() == slice(1542, 1543, None)
)
def suite(): def suite():
test_suite = unittest.TestSuite() test_suite = unittest.TestSuite()
for ui in (TestHDF5Scan, ): for ui in (TestHDF5Scan, ):
......
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