10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-14 01:53:49 +01:00

Improve extract_data

This commit is contained in:
Anthony Scemama 2023-04-14 12:33:29 +02:00
parent 86ad99a753
commit 9c2fee6e1c

View File

@ -43,8 +43,8 @@ def extract_data(output):
e_ex_line = lines[iline+2]
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
@ -52,6 +52,4 @@ def extract_data(output):
data = extract_data(output)
for item in data:
print(" ".join(str(x) for x in item))
print(item)