From fc3657be1186de8656bc69b02c55f3508906ea64 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 1 Dec 2022 14:23:37 +0000 Subject: [PATCH] feat: read_DistillationContraction_hd5 can now handle complex normalization of triangle diagrams. --- pyerrors/input/hadrons.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyerrors/input/hadrons.py b/pyerrors/input/hadrons.py index e4671933..dc8429e1 100644 --- a/pyerrors/input/hadrons.py +++ b/pyerrors/input/hadrons.py @@ -172,9 +172,15 @@ def read_DistillationContraction_hd5(path, ens_id, diagrams=["direct"], idl=None # "DistillationContraction/Metadata/DmfSuffix" contains info about different quarks, irrelevant in the SU(3) case. for diagram in diagrams: + + if diagram == "triangle" and "Identity" not in str(identifier): + part = "im" + else: + part = "re" + real_data = np.zeros(Nt) for x0 in range(Nt): - raw_data = h5file["DistillationContraction/Correlators/" + diagram + "/" + str(x0)][:]["re"].astype(np.double) + raw_data = h5file["DistillationContraction/Correlators/" + diagram + "/" + str(x0)][:][part].astype(np.double) real_data += np.roll(raw_data, -x0) real_data /= Nt