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

Pluginise mpes reader #243

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
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
20 changes: 7 additions & 13 deletions pynxtools/dataconverter/readers/example/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@

#
"""An example reader implementation for the DataConverter."""
import os
from typing import Tuple, Any
import json
import os
from typing import Any, Tuple

import numpy as np

from pynxtools.dataconverter.readers.base.reader import BaseReader
Expand Down Expand Up @@ -86,17 +87,13 @@ def read(
}

# external links
template[("/ENTRY" "[entry]/test_link" "/external_link")] = {
template[("/ENTRY[entry]/test_link/external_link")] = {
"link": f"{os.path.dirname(__file__)}/../../../../tests/"
f"data/dataconverter/readers/mpes/"
f"xarray_saved_small_calibration.h5:/axes/ax3"
"data/nexus/xarray_saved_small_calibration.h5:/axes/ax3"
}

# virtual datasets concatenation
my_path = str(
f"{os.path.dirname(__file__)}/../../../../tests/"
f"data/dataconverter/readers/mpes"
)
my_path = str(f"{os.path.dirname(__file__)}/../../../../tests/data/nexus")
my_datasets = {
"link": [
f"{my_path}/xarray_saved_small_calibration.h5:/axes/ax0",
Expand All @@ -109,10 +106,7 @@ def read(
] = my_datasets

# virtual datasets slicing
my_path = str(
f"{os.path.dirname(__file__)}/../../../../tests/"
f"data/dataconverter/readers/mpes"
)
my_path = str(f"{os.path.dirname(__file__)}/../../../../tests/data/nexus")
template[("/ENTRY[entry]" "/test_virtual" "_dataset/sliced" "_dataset")] = {
"link": (
f"{my_path}/xarray_saved_small_" "calibration.h5:/binned/BinnedData"
Expand Down
4 changes: 0 additions & 4 deletions pynxtools/dataconverter/readers/mpes/README.md

This file was deleted.

Empty file.
Loading
Loading