Skip to content
Snippets Groups Projects
Commit 457bb620 authored by Antonello, Dr. Massimiliano's avatar Antonello, Dr. Massimiliano
Browse files

Now sumlab_auto can extract automatically the correct t_gate to be used from each file_name

parent 5efd1b11
No related branches found
No related tags found
No related merge requests found
...@@ -70,9 +70,12 @@ print("=======================================\033[0m") ...@@ -70,9 +70,12 @@ print("=======================================\033[0m")
# Loop thorough SORTED files in alphabetical order! # Loop thorough SORTED files in alphabetical order!
files_to_fit = sorted(files_to_fit, key=lambda x: x[0]) files_to_fit = sorted(files_to_fit, key=lambda x: x[0])
for i, (file, path) in enumerate(files_to_fit): for i, (file, path) in enumerate(files_to_fit):
print("Fitting: \033[95m{:s}\033[0m".format(file))
V = float(file.split('deg')[1].split('V')[0].replace('_', '.')) V = float(file.split('deg')[1].split('V')[0].replace('_', '.'))
f_tau_hmt = f_tau(V, V_bd_hmt, V_0_hmt) if 'ns' in file:
t_gate = float(file.split('V')[1].split('ns')[0].replace('_', '.'))
print(f"Fitting: \033[95m{file}\033[0m (t_gate = {t_gate} ns)")
#f_tau_hmt = f_tau(V, V_bd_hmt, V_0_hmt)
# Load files. # Load files.
data = np.loadtxt(path, skiprows=0) data = np.loadtxt(path, skiprows=0)
...@@ -83,7 +86,7 @@ for i, (file, path) in enumerate(files_to_fit): ...@@ -83,7 +86,7 @@ for i, (file, path) in enumerate(files_to_fit):
tau=tau, # SLOW PULSE COMPONENT TIME CONSTANT (ns) tau=tau, # SLOW PULSE COMPONENT TIME CONSTANT (ns)
t_gate=t_gate, # GATE LENGTH (ns) t_gate=t_gate, # GATE LENGTH (ns)
t_0=t_0, # INTEGRATION TIME BEFORE GATE (ns) t_0=t_0, # INTEGRATION TIME BEFORE GATE (ns)
tau_R=f_tau_hmt*tau, tau_R=0.65*tau, #WAS: tau_R=f_tau_hmt*tau,
bin_0=bin_0, bin_0=bin_0,
truncate_nsigma0_up=truncate_nsigma0_up, truncate_nsigma0_up=truncate_nsigma0_up,
truncate_nsigma0_do=truncate_nsigma0_do, truncate_nsigma0_do=truncate_nsigma0_do,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment