From cc93d54f98448162883b3eae6f87f121f11aec60 Mon Sep 17 00:00:00 2001 From: Abdallah Ammar Date: Sun, 16 Apr 2023 03:43:28 +0200 Subject: [PATCH] extract in better format --- scripts/qp_extract_cipsi_data.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/qp_extract_cipsi_data.py b/scripts/qp_extract_cipsi_data.py index 8f0b1f3c..faffdda2 100755 --- a/scripts/qp_extract_cipsi_data.py +++ b/scripts/qp_extract_cipsi_data.py @@ -41,7 +41,8 @@ def extract_data(output): e_ex = float(e_ex_line.split()[1]) reading = False - data.append((n_det, e, pt2, err_pt2, rpt2, err_rpt2, e_ex)) + new_data = " {:8d} {:16.8f} {:e} {:e} {:e} {:e} {:16.8f}".format(n_det, e, pt2, err_pt2, rpt2, err_rpt2, e_ex) + data.append(new_data) n_det = e = pt2 = err_pt2 = rpt2 = err_rpt2 = e_ex = None return data @@ -49,6 +50,6 @@ def extract_data(output): data = extract_data(output) for item in data: - print(" ".join(str(x) for x in item)) + print(item)