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
workflow
ewoksapps
est
Commits
0fbd6f77
Commit
0fbd6f77
authored
Aug 12, 2021
by
Henri Payno
Browse files
[io][spec] add test on mu once divided by the monitor. Can contain some infinite values
parent
536e90ff
Pipeline
#52527
failed with stages
in 20 minutes and 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
est/core/process/pymca/normalization.py
View file @
0fbd6f77
...
...
@@ -160,7 +160,8 @@ class PyMca_normalization(Process):
self
.
_advancement
.
startProcess
()
self
.
_pool_process
(
xas_obj
=
_xas_obj
)
self
.
_advancement
.
endProcess
()
assert
_xas_obj
.
normalized_energy
is
not
None
if
_xas_obj
.
normalized_energy
is
None
:
raise
ValueError
(
"Fail to compute normalize energy"
)
self
.
register_process
(
_xas_obj
,
data_keys
=
(
...
...
est/io/utils/spec.py
View file @
0fbd6f77
...
...
@@ -107,7 +107,14 @@ def read_spectrum(
monitor
=
spec_file
.
data_column_by_name
(
scan_index
=
i_data
,
label
=
monitor_col_name
)
mu
=
mu
/
monitor
if
numpy
.
any
(
mu
==
numpy
.
inf
)
or
numpy
.
any
(
mu
==
-
numpy
.
inf
):
_logger
.
warning
(
"found inf values after mu division by the monitor. Replace them by 0"
)
mu
[
mu
==
numpy
.
inf
]
=
0
mu
[
mu
==
-
numpy
.
inf
]
=
0
return
energy
,
numpy
.
asarray
(
mu
)
return
energy
,
mu
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