Commit 4704c811 authored by payno's avatar payno
Browse files

fix, hdf5scan.projection are now dict as edfscan

parent 679e51d2
Pipeline #15507 passed with stages
in 1 minute and 43 seconds
......@@ -182,7 +182,7 @@ class HDF5TomoScan(TomoScanBase):
if self.master_file is None or not os.path.exists(self.master_file):
return
with h5py.File(self.master_file, 'r') as h5_file:
urls = []
urls = {}
if (self._entry in h5_file and
HDF5TomoScan._PROJ_PATH in h5_file[self._entry]):
image = h5_file[self._entry][HDF5TomoScan._PROJ_PATH]
......@@ -214,7 +214,7 @@ class HDF5TomoScan(TomoScanBase):
slice_number = slice_data[2]
silx_url = DataUrl(file_path=file_path, data_path=data_path,
data_slice=(slice_number,), scheme=scheme)
urls.append(silx_url)
urls[i_slice] = silx_url
return urls
@docstring(TomoScanBase.tomo_n)
......
......@@ -74,9 +74,14 @@ class TestHDF5Scan(HDF5TestBaseClass):
self.assertFalse(url_1.is_absolute())
self.assertEquals(url_1.scheme(), 'silx')
def testFrames(self):
def testProjections(self):
projections = self.scan.projections
self.assertEqual(len(projections), 100)
proj_1 = projections[0]
self.assertEqual(proj_1.file_path(),
'../../../../../../users/opid19/W:/clemence/visualtomo/data_test2/tomo0001/tomo_0000.h5')
self.assertEqual(proj_1.data_slice(), ('0',))
self.assertTrue(100 not in projections)
@unittest.skip('no valid hdf5 acquisition defined yet')
def testDark(self):
......
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