From f73491cbb37f8a2c4bdde3d6b307bdbd09f29fd9 Mon Sep 17 00:00:00 2001 From: Diego Martinez Gutierrez <101260978+diegomartinez2@users.noreply.github.com> Date: Mon, 18 Dec 2023 08:27:44 +0100 Subject: [PATCH] Update Spectral.py Quickfix on filename for 'output_file_sort_function'. --- cellconstructor/Spectral.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cellconstructor/Spectral.py b/cellconstructor/Spectral.py index cc8ee36..2304c4a 100644 --- a/cellconstructor/Spectral.py +++ b/cellconstructor/Spectral.py @@ -1165,11 +1165,10 @@ def get_full_dynamic_correction_along_path_multiprocessing(dyn, If 'None' then the number returned by os.cpu_count() is used. (default: None) """ - def output_file_sort_function(filename_sp, smear_id_cm, smear_cm, nsm): + def output_file_sort_function(filename_data, smear_id_cm, smear_cm, nsm): for ism in range(nsm): - name = "{:5.2f}".format(smear_id_cm[ism]).strip()+"_"+"{:6.1f}".format(smear_cm[ism]).strip() - # - filename_data = filename_sp+'_'+name+'.dat' + #name = "{:5.2f}".format(smear_id_cm[ism]).strip()+"_"+"{:6.1f}".format(smear_cm[ism]).strip() + #filename_data = filename_sp+'_'+name+'.dat' f = open(filename_data, 'r') head1 = f.readline() head2 = f.readline() @@ -1345,7 +1344,7 @@ def output_file_sort_function(filename_sp, smear_id_cm, smear_cm, nsm): for ism in range(nsm): name="{:6.1f}".format(smear_cm[ism]).strip() filename_new=filename_sp+'_'+name+'.dat' - output_file_sort_function(filename_sp, smear_id_cm, smear_cm, nsm) + output_file_sort_function(filename_new, smear_id_cm, smear_cm, nsm)