Commit a470ecfb authored by Thomas Vincent's avatar Thomas Vincent

replace EdfFile by fabio

parent a5e92a11
......@@ -723,6 +723,7 @@ def get_project_configuration(dry_run):
# for most of the computation
"numpy%s" % numpy_requested_version,
"h5py",
"fabio",
"silx>=0.8.0",
"xrayutilities",
"scipy",
......@@ -732,7 +733,7 @@ def get_project_configuration(dry_run):
setup_requires = ["setuptools", "numpy", "Cython>=0.21.1"]
extras_require = {
"GUI": ["PyOpenGL", "matplotlib", "PyQt5"]
"gui": ["PyOpenGL", "matplotlib", "PyQt5"]
}
package_data = {
......@@ -745,7 +746,7 @@ def get_project_configuration(dry_run):
}
entry_points = {
'console_scripts': ['xsocs = xsocs.__main__:main [GUI]'],
'console_scripts': ['xsocs = xsocs.__main__:main [gui]'],
}
cmdclass = dict(
......
......@@ -42,7 +42,7 @@ from multiprocessing import Pool, cpu_count, Manager
import h5py
import numpy as np
from silx.third_party import EdfFile
import fabio
from ...io import XsocsH5
......@@ -775,12 +775,12 @@ def _add_edf_data(scan_id,
entry=entry)
progress[proc_idx] = 2
edf_file = EdfFile.EdfFile(img_f, access='r', fastedf=True)
edf_file = fabio.open(img_f)
progress[proc_idx] = 5
n_images = edf_file.GetNumImages()
n_images = edf_file.nframes
image = edf_file.GetData(0)
image = edf_file.data
dtype = image.dtype
img_shape = image.shape
......@@ -821,7 +821,7 @@ def _add_edf_data(scan_id,
raise Exception('Merge of scan {0} aborted.'
''.format(scan_id))
data = edf_file.GetData(i)
data = edf_file.getframe(i).data
image_dset[i, :, :] = data[row:row+img_shape[0],
column:column+img_shape[1]]
......
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