Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
steinnymir committed Nov 4, 2023
1 parent 859a929 commit 4710201
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions sed/calibrator/delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ def __init__(
config (dict, optional): Config dictionary. Defaults to None.
"""
self._config: dict = config or {}

self.loader: str = self._config["core"]["loader"]
if self.loader == "hextof":
self._append_delay_axis_docstring: str = self.append_delay_axis_hextof.__doc__
elif self.loader == "mpes":
self._append_delay_axis_docstring = self.append_delay_axis_mpes.__doc__
else:
raise NotImplementedError(f"Loader '{self.loader}' not implemented.")

self.adc_column: str = self._config["dataframe"].get("adc_column", None)
self.delay_stage_column: str = self._config["dataframe"].get("delay_stage_column", None)
Expand All @@ -59,6 +52,10 @@ def append_delay_axis(
**kwargs,
) -> Tuple[Union[pd.DataFrame, dask.dataframe.DataFrame], dict]:
"""TODO: docstring"""
if self.loader not in ["mpes", "hextof"]:
raise NotImplementedError(
f"Delay calibration is implemented for 'mpes' and 'hextof', not {self.loader}.",
)
method = getattr(self, f"append_delay_axis_{self.loader}")
return method(df, *args, **kwargs)

Expand Down

0 comments on commit 4710201

Please sign in to comment.