Commit 0fbd6f77 authored by Henri Payno's avatar 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
......@@ -160,7 +160,8 @@ class PyMca_normalization(Process):
assert _xas_obj.normalized_energy is not None
if _xas_obj.normalized_energy is None:
raise ValueError("Fail to compute normalize energy")
......@@ -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):
"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
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