Commit 4bb180d1 authored by payno's avatar payno
Browse files

[edf_to_nx] remove deprecated code from fabio

parent 393bf75e
Pipeline #37752 failed with stages
in 17 seconds
......@@ -222,7 +222,10 @@ def edf_to_nx(
indexes = sorted(projections_urls.keys())
first_proj_file = projections_urls[indexes[0]]
fid = fabio.open(first_proj_file.file_path())
hd = fid.getHeader()
if hasattr(fid, 'header'):
hd = fid.header
else:
hd = fid.getHeader()
try:
rotangle_index = (
hd[file_keys.motor_mne_key]
......@@ -250,7 +253,10 @@ def edf_to_nx(
except:
ztrans_index = -1
frame_type = fid.getByteCode()
if hasattr(fid, 'bytecode'):
frame_type = fid.bytecode
else:
frame_type = fid.getByteCode()
return frame_type, rotangle_index, xtrans_index, ytrans_index, ztrans_index
(
......
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