From d0180d79676bc913eecdf568a54f349fcad1748b Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Tue, 12 Jul 2022 11:11:36 +0100 Subject: [PATCH] feat: explicit check for Zeuthen_flow in read_gf_coupling added. --- pyerrors/input/openQCD.py | 3 +++ tests/openQCD_in_test.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/pyerrors/input/openQCD.py b/pyerrors/input/openQCD.py index 9644e9ef..50d98d99 100644 --- a/pyerrors/input/openQCD.py +++ b/pyerrors/input/openQCD.py @@ -613,6 +613,9 @@ def read_gf_coupling(path, prefix, c, dtr_cnfg=1, Zeuthen_flow=True, **kwargs): if T != L: raise Exception("The required lattice norm is only implemented for T=L at the moment.") + if Zeuthen_flow is not True: + raise Exception("The required lattice norm is only implemented for the Zeuthen flow at the moment.") + t = (c * L) ** 2 / 8 normdict = {4: 0.012341170468270, diff --git a/tests/openQCD_in_test.py b/tests/openQCD_in_test.py index 71b47ba2..9039e5e0 100644 --- a/tests/openQCD_in_test.py +++ b/tests/openQCD_in_test.py @@ -106,3 +106,5 @@ def test_gf_coupling(): gf = pe.input.openQCD.read_gf_coupling(path, prefix, c=0.3) with pytest.raises(Exception): pe.input.openQCD.read_gf_coupling(path, prefix, c=0.35) + with pytest.raises(Exception): + pe.input.openQCD.read_gf_coupling(path, prefix, c=0.3, Zeuthen_flow=False)