Skip to content

Commit

Permalink
Add keys to callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
domna committed Jul 23, 2024
1 parent 25983ba commit 430255e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pynxtools_mpes/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def handle_eln_file(self, file_path: str) -> Dict[str, Any]:

return {}

def get_eln_data(self, path: str) -> Any:
def get_eln_data(self, key: str, path: str) -> Any:
"""Returns data from the given eln path."""
if self.eln_data is None:
return None
Expand Down Expand Up @@ -231,7 +231,7 @@ def handle_objects(self, objects: Tuple[Any]) -> Dict[str, Any]:
)
return {}

def get_data(self, path: str) -> Any:
def get_data(self, key: str, path: str) -> Any:
try:
value = rgetattr(obj=self.data_xarray, attr=path)
if path.split("/")[-1] == "@axes":
Expand All @@ -247,10 +247,10 @@ def get_data(self, path: str) -> Any:
f"contain entry corresponding to the path {path}"
)

def get_data_dims(self, path: str) -> List[str]:
def get_data_dims(self, key: str, path: str) -> List[str]:
return list(map(str, self.data_xarray.dims))

def get_attr(self, path: str) -> Any:
def get_attr(self, key: str, path: str) -> Any:
try:
return iterate_dictionary(self.data_xarray.attrs, path)
except KeyError:
Expand Down

0 comments on commit 430255e

Please sign in to comment.