From ed6393d4a222bac11c6afc12b068eff6c906ce2a Mon Sep 17 00:00:00 2001
From: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de>
Date: Wed, 13 Sep 2023 17:29:47 +0200
Subject: [PATCH] =?UTF-8?q?=C2=A8Bug=20fix.=C2=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pes_to_spec/model.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pes_to_spec/model.py b/pes_to_spec/model.py
index 5e72e2d..c635c37 100644
--- a/pes_to_spec/model.py
+++ b/pes_to_spec/model.py
@@ -924,7 +924,7 @@ class Model(TransformerMixin, BaseEstimator):
 
         Returns: Total variance per channel.
         """
-        channels = list(low_res_data.keys())
+        channels = list(self.channel_pca.keys())
         return {ch: np.sum(self.channel_pca[ch].explained_variance_) for ch in channels}
 
     def check_compatibility(self, low_res_data: Dict[str, np.ndarray], pulse_spacing: Optional[Dict[str, List[int]]]=None, pulse_energy: Optional[np.ndarray]=None) -> np.ndarray:
-- 
GitLab