Commit 8cf1dc42 authored by Wout De Nolf's avatar Wout De Nolf
Browse files

PlotSpectrumData: add "flatten_mu" to the possible Y values (take by default)

parent cca95533
Pipeline #81195 passed with stages
in 10 minutes and 16 seconds
......@@ -61,7 +61,6 @@ def process_spectr_pre_edge(
"leexiang",
"tables",
"fit_erfc",
"make_flat",
):
if opt_name in _conf:
opts[opt_name] = _conf[opt_name]
......
......@@ -5,6 +5,7 @@ from ewokscore import Task
_Y_TO_X_NAME = {
"mu": "energy",
"normalized_mu": "energy",
"flatten_mu": "energy",
"chi": "k",
"ft": "ft",
"noise_savgol": "energy",
......@@ -13,6 +14,7 @@ _LABELS = {
"energy": "Energy (eV)",
"mu": "μ",
"normalized_mu": "Norm(μ)",
"flatten_mu": "Norm(μ)",
"chi": "k^{kweight} χ(k) (Å^-{kweight})",
"ft": "|χ(k)| (Å^-{kweightp1})",
"k": "Wavenumber (Å^-1)",
......@@ -29,7 +31,7 @@ def process_plotspectrumdata(
plot_data = dict()
if not plot_names:
plot_names = ("normalized_mu", "chi", "ft", "noise_savgol")
plot_names = ("flatten_mu", "chi", "ft", "noise_savgol")
for yname in plot_names:
ylabel = _LABELS[yname]
......
......@@ -53,12 +53,12 @@ def test_larch_plotspectrumdata(filename_cu_from_pymca):
{
"id": "plotdata",
"name": "plot_names",
"value": ("normalized_mu", "mu", "chi", "ft", "noise_savgol"),
"value": ("flatten_mu", "normalized_mu", "mu", "chi", "ft", "noise_savgol"),
}
)
result = execute_graph(_LARCH_WORKFLOW, inputs=inputs)
assert len(result["plot_data"]) == 5
assert len(result["plot_data"]) == 6
for name, data in result["plot_data"].items():
if name == "chi":
n = 324
......
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