From ace81eaf8c78d57b49beaab22eebe8957de6bdd9 Mon Sep 17 00:00:00 2001
From: Katjana Neumann <neumannk@uh2ulnmpcb0.desy.de>
Date: Wed, 6 Nov 2024 15:12:39 +0100
Subject: [PATCH] added integral length in the h5 file.

---
 user/sumlab_auto.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/user/sumlab_auto.py b/user/sumlab_auto.py
index 9919edb..36666ec 100644
--- a/user/sumlab_auto.py
+++ b/user/sumlab_auto.py
@@ -71,7 +71,7 @@ print("=======================================\033[0m")
 files_to_fit = sorted(files_to_fit, key=lambda x: x[0])
 G = []; d_G = []; G_prefit = []; d_G_prefit = []
 V_bias = []
-
+t_gates=[]
 for i, (file, path) in enumerate(files_to_fit):
     V = float(file.split('deg')[1].split('V')[0].replace('_', '.'))
     if 'ns' in file:
@@ -81,7 +81,7 @@ for i, (file, path) in enumerate(files_to_fit):
     #V = float(items[2].replace('V', '').replace('p', '.'))
     # f_tau_hmt = f_tau(V, V_bd_hmt, V_0_hmt)
     V_bias.append(V)
-
+    t_gates.append(t_gate)
     # Load files.
     data = np.loadtxt(path, skiprows=0)
     # Create a PeakOTron Fit Object.
@@ -135,6 +135,7 @@ d_G = np.array(d_G)
 G_prefit = np.array(G_prefit)
 d_G_prefit = np.array(d_G_prefit)
 V_bias = np.array(V_bias)
+t_gates = np.array(t_gates)
 
 with h5py.File(f"{folder}/{os.path.basename(folder)}.h5", 'w') as f:
     f.create_dataset('G', data=G)
@@ -142,5 +143,6 @@ with h5py.File(f"{folder}/{os.path.basename(folder)}.h5", 'w') as f:
     f.create_dataset('G_prefit', data=G_prefit)
     f.create_dataset('d_G_prefit', data=d_G_prefit)
     f.create_dataset('V_bias', data=V_bias)
+    f.create_dataset('integral_length', data=t_gates)
 
 print("\033[95m=======================================\033[0m")
-- 
GitLab