From a6b625288c608bff60cc7b2f016c7afa7bc4fe23 Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Tue, 7 Nov 2023 11:11:45 +0100
Subject: [PATCH] cache get_strixel_parameters

---
 src/cal_tools/jungfrau/jfstrixel.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/cal_tools/jungfrau/jfstrixel.py b/src/cal_tools/jungfrau/jfstrixel.py
index f4c26622c..b388e5063 100644
--- a/src/cal_tools/jungfrau/jfstrixel.py
+++ b/src/cal_tools/jungfrau/jfstrixel.py
@@ -1,11 +1,14 @@
 
-import numpy as np
+from functools import lru_cache
 from pathlib import Path
 
+import numpy as np
+
 REGULAR_SHAPE = (512, 1024)
 DIR_PATH = package_directory = Path(__file__).resolve().parent
 
 
+@lru_cache
 def get_strixel_parameters(kind):
     """Returns a dictionary of strixel parameters stored in .npz file
     based on the given kind.
-- 
GitLab