Commit 7399988c authored by payno's avatar payno Committed by Henri Payno
Browse files

intensity normalization: fix providing a dataset url

parent 59d53b1b
......@@ -536,11 +536,14 @@ class _NabuBaseReconstructor:
config["preproc"]["sino_normalization_file"] = dataset_url.path()
elif source is INormSource.DATASET:
url = extra_infos["dataset_url"]
if not isinstance(url, DataUrl):
if isinstance(url, DataUrl):
config["preproc"]["sino_normalization_file"] = url.path()
elif isinstance(url, str):
config["preproc"]["sino_normalization_file"] = url
else:
raise TypeError(
f"dataset_url is expected to be an instance of DataUrl. Not {type(url)}"
f"dataset_url is expected to be an instance of DataUrl or str representing a DataUrl. Not {type(url)}"
)
config["preproc"]["sino_normalization_file"] = url.path()
else:
raise NotImplementedError(f"source type {source.value} is not handled")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment