From 6aef18ebe10e8cc2e883cf040de9c1698734186c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Romain=20BRON=C3=88S?= <romain.brones@synchrotron-soleil.fr>
Date: Thu, 25 Jan 2024 09:59:13 +0100
Subject: [PATCH] fix: Use filname for adhoc respmat loading

---
 FofbTool.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/FofbTool.py b/FofbTool.py
index 22741f9..4f11ca7 100755
--- a/FofbTool.py
+++ b/FofbTool.py
@@ -607,8 +607,8 @@ def fofbcommand_writeref(what='current'):
 
 def fofbcommand_writemat(filename='respmat.npy'):
 
-    fofbcommand["x_inv_resp_mat"] = np.hstack([np.zeros((50, 1)), np.load("respmat.npy")[50:], np.zeros((50,5))]).astype(int)
-    fofbcommand["y_inv_resp_mat"] = np.hstack([np.zeros((50, 1)), np.load("respmat.npy")[:50], np.zeros((50,5))]).astype(int)
+    fofbcommand["x_inv_resp_mat"] = np.hstack([np.zeros((50, 1)), np.load(filename)[50:], np.zeros((50,5))]).astype(int)
+    fofbcommand["y_inv_resp_mat"] = np.hstack([np.zeros((50, 1)), np.load(filename)[:50], np.zeros((50,5))]).astype(int)
 
 ###################################################################################################
 #
-- 
GitLab