From 49848125639ff481ed112bd1b862d80a351aa6de Mon Sep 17 00:00:00 2001
From: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de>
Date: Thu, 16 Feb 2023 18:33:33 +0100
Subject: [PATCH] Reverted some debugging lines.

---
 pes_to_spec/model.py                 | 4 ++--
 pes_to_spec/test/offline_analysis.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pes_to_spec/model.py b/pes_to_spec/model.py
index d0b2259..0e038dd 100644
--- a/pes_to_spec/model.py
+++ b/pes_to_spec/model.py
@@ -440,10 +440,10 @@ class SelectRelevantLowResolution(TransformerMixin, BaseEstimator):
         """
         # reduce on channel and on train ID
         sum_low_res = - np.mean(sum(list(X.values())), axis=0)
-        axis = np.arange(0.0, sum_low_res.shape[1], 1.0)
+        axis = np.arange(0.0, sum_low_res.shape[0], 1.0)
         #widths = np.arange(10, 50, step=5)
         #peak_idx = find_peaks_cwt(sum_low_res, widths)
-        gaussian = np.exp(-0.5*(axis - sum_low_res.shape[1]//2)**2/20**2)
+        gaussian = np.exp(-0.5*(axis - sum_low_res.shape[0]//2)**2/20**2)
         gaussian /= np.sum(gaussian, axis=1, keepdims=True)
         # apply it to the data
         smoothened = fftconvolve(sum_low_res, gaussian, mode="same", axes=1)
diff --git a/pes_to_spec/test/offline_analysis.py b/pes_to_spec/test/offline_analysis.py
index d1fcf77..d433fc9 100755
--- a/pes_to_spec/test/offline_analysis.py
+++ b/pes_to_spec/test/offline_analysis.py
@@ -139,8 +139,8 @@ def main():
 
     print("Opening run ...")
     # get run
-    #run = open_run(proposal=args.proposal, run=args.run)
-    run = RunDirectory("/gpfs/exfel/data/scratch/tmichela/data/r0206")
+    run = open_run(proposal=args.proposal, run=args.run)
+    #run = RunDirectory("/gpfs/exfel/data/scratch/tmichela/data/r0206")
 
     # ----------------Used in the first tests-------------------------
     # get train IDs and match them, so we are sure to have information from all needed sources
-- 
GitLab