From 56cd5aea460c6cce9322a619890ec3d9ced20638 Mon Sep 17 00:00:00 2001 From: "Antonello, Dr. Massimiliano" <massimiliano.antonello@uni-hamburg.de> Date: Thu, 24 Oct 2024 12:31:33 +0200 Subject: [PATCH] Now peakotron perform the fits in alphabetic order --- user/sumlab_auto.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user/sumlab_auto.py b/user/sumlab_auto.py index 9fb3684..37f590b 100644 --- a/user/sumlab_auto.py +++ b/user/sumlab_auto.py @@ -67,7 +67,8 @@ print("\033[95m\n=======================================") print(" PeakOTron") print("=======================================\033[0m") -# Loop thorough files +# Loop thorough SORTED files in alphabetical order! +files_to_fit = sorted(files_to_fit, key=lambda x: x[0]) 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('_', '.')) -- GitLab