From 4ca967d55b733c12aaaf30af487da52d4cf9e1b7 Mon Sep 17 00:00:00 2001 From: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Mon, 19 Dec 2022 18:17:52 +0100 Subject: [PATCH] Bugfix in debug plot. --- pes_to_spec/model.py | 4 ++-- scripts/test_analysis.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pes_to_spec/model.py b/pes_to_spec/model.py index 41014f6..af421a4 100644 --- a/pes_to_spec/model.py +++ b/pes_to_spec/model.py @@ -131,7 +131,7 @@ class Model(object): """ # reduce on channel and on train ID sum_low_res = - np.mean(sum(list(low_res_data.values())), axis=0) - widths = np.arange(10, 50, step=5) + widths = np.arange(10, 50, step=1) peak_idx = find_peaks_cwt(sum_low_res, widths) if len(peak_idx) < 1: raise PromptNotFoundError() @@ -158,7 +158,7 @@ class Model(object): ax.set(title="", xlabel="Photon Spectrometer channel", ylabel="Sum of all Photon Spectrometer channels") - plt.axvline(100, + plt.axvline(peak_idx, linewidth=3, ls="--", color='r', diff --git a/scripts/test_analysis.py b/scripts/test_analysis.py index 56b924c..3d848dc 100755 --- a/scripts/test_analysis.py +++ b/scripts/test_analysis.py @@ -111,7 +111,7 @@ def main(): n_pca_hr=20, high_res_sigma=0.2, tof_start=None, - delta_tof=400, + delta_tof=200, validation_size=0.05) train_idx = np.isin(tids, train_tids) -- GitLab