Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
d9f15fb3
Commit
d9f15fb3
authored
Jan 07, 2022
by
Pierre Paleo
Browse files
Improve error message when sino_normalization_file is invalid
parent
47c1a579
Pipeline
#73814
failed with stage
in 29 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nabu/pipeline/fullfield/chunked.py
View file @
d9f15fb3
...
...
@@ -598,6 +598,7 @@ class ChunkedPipeline:
self
.
sino_normalization
=
self
.
SinoNormalizationClass
(
kind
=
options
[
"method"
],
radios_shape
=
self
.
_get_shape
(
"sino_normalization"
),
normalization_array
=
options
[
"normalization_array"
]
)
@
use_options
(
"build_sino"
,
"sino_builder"
)
...
...
nabu/pipeline/fullfield/processconfig.py
View file @
d9f15fb3
...
...
@@ -147,19 +147,18 @@ class ProcessConfig(ProcessConfigBase):
def
_get_user_sino_normalization
(
self
):
self
.
_sino_normalization_arr
=
None
norm
=
nabu_config
[
"preproc"
][
"sino_normalization"
]
norm
=
self
.
nabu_config
[
"preproc"
][
"sino_normalization"
]
if
norm
not
in
[
"subtraction"
,
"division"
]:
return
norm_path
=
"silx://"
+
self
.
nabu_config
[
"preproc"
][
"sino_normalization_file"
].
strip
()
url
=
DataUrl
(
norm_path
)
try
:
norm_array
=
get_data
(
url
)
self
.
_sino_normalization_arr
=
norm_array
.
astype
(
"f"
)
except
(
ValueError
,
OSError
)
as
exc
:
self
.
logger
.
error
(
"Could not load sino_normalization_file %s. The error was:"
%
norm_path
)
self
.
logger
.
error
(
str
(
exc
))
self
.
_sino_normalization_arr
=
norm_array
.
astype
(
"f"
)
error_msg
=
"Could not load sino_normalization_file %s. The error was: %s"
%
(
norm_path
,
str
(
exc
))
self
.
logger
.
error
(
error_msg
)
raise
ValueError
(
error_msg
)
@
property
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment