Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
53a20bf8
Commit
53a20bf8
authored
Jan 07, 2022
by
Pierre Paleo
Browse files
Improve error message when sino_normalization_file is invalid
parent
c61193ab
Pipeline
#65163
passed with stage
in 6 minutes and 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nabu/pipeline/fullfield/chunked.py
View file @
53a20bf8
...
...
@@ -597,6 +597,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 @
53a20bf8
...
...
@@ -140,19 +140,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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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