From 430255eb5e2255933b2f40d80fd981b06ba680e1 Mon Sep 17 00:00:00 2001 From: domna Date: Tue, 23 Jul 2024 19:35:05 +0200 Subject: [PATCH] Add keys to callbacks --- pynxtools_mpes/reader.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pynxtools_mpes/reader.py b/pynxtools_mpes/reader.py index 35e2be8..56a288d 100644 --- a/pynxtools_mpes/reader.py +++ b/pynxtools_mpes/reader.py @@ -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 @@ -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": @@ -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: