Skip to content

Commit

Permalink
Fix mpes data indices
Browse files Browse the repository at this point in the history
  • Loading branch information
domna committed Nov 19, 2023
1 parent c3fc4eb commit d4ca808
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions pynxtools/dataconverter/readers/mpes/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,6 @@ def handle_h5_and_json_file(file_paths, objects):
f"but {file_path} does not match.",
)

if not os.path.exists(file_path):
file_path = os.path.join(
os.path.dirname(__file__),
"..",
"..",
"..",
"..",
"tests",
"data",
"dataconverter",
"readers",
"mpes",
file_path,
)
if not os.path.exists(file_path):
raise FileNotFoundError(
errno.ENOENT,
Expand Down Expand Up @@ -252,7 +238,7 @@ def _getattr(obj, attr):

if "index" in attr:
axis = attr.split(".")[0]
return str(obj.dims.index(f"{axis}"))
return obj.dims.index(f"{axis}")

return reduce(_getattr, [obj] + attr.split("."))

Expand Down

0 comments on commit d4ca808

Please sign in to comment.