Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mpes data indices #178

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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):
domna marked this conversation as resolved.
Show resolved Hide resolved
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
Loading