feat: Exception for gf coupling c!=0.3 added and documenation and tests

extended.
This commit is contained in:
Fabian Joswig 2022-07-11 17:14:32 +01:00
parent 5cd20f5818
commit 638ec92ab7
2 changed files with 7 additions and 0 deletions

View file

@ -569,6 +569,8 @@ def read_qtop(path, prefix, c, dtr_cnfg=1, version="openQCD", **kwargs):
def read_gf_coupling(path, prefix, c, dtr_cnfg=1, Zeuthen_flow=True, **kwargs): def read_gf_coupling(path, prefix, c, dtr_cnfg=1, Zeuthen_flow=True, **kwargs):
"""Read the gradient flow coupling based on sfqcd gradient flow measurements. See 1607.06423 for details. """Read the gradient flow coupling based on sfqcd gradient flow measurements. See 1607.06423 for details.
Note: The current implementation only works for c=0.3 and T=L. The definition of the coupling in 1607.06423 requires projection to topological charge zero which is not done within this function but has to be performed in a separate step.
Parameters Parameters
---------- ----------
path : str path : str
@ -600,6 +602,9 @@ def read_gf_coupling(path, prefix, c, dtr_cnfg=1, Zeuthen_flow=True, **kwargs):
(optional) If True, the Zeuthen flow is used for the coupling. If False, the Wilson flow is used. (optional) If True, the Zeuthen flow is used for the coupling. If False, the Wilson flow is used.
""" """
if c != 0.3:
raise Exception("The required lattice norm is only implemented for c=0.3 at the moment.")
plaq = _read_flow_obs(path, prefix, c, dtr_cnfg=dtr_cnfg, version="sfqcd", obspos=6, sum_t=False, Zeuthen_flow=Zeuthen_flow, integer_charge=False, **kwargs) plaq = _read_flow_obs(path, prefix, c, dtr_cnfg=dtr_cnfg, version="sfqcd", obspos=6, sum_t=False, Zeuthen_flow=Zeuthen_flow, integer_charge=False, **kwargs)
C2x1 = _read_flow_obs(path, prefix, c, dtr_cnfg=dtr_cnfg, version="sfqcd", obspos=7, sum_t=False, Zeuthen_flow=Zeuthen_flow, integer_charge=False, **kwargs) C2x1 = _read_flow_obs(path, prefix, c, dtr_cnfg=dtr_cnfg, version="sfqcd", obspos=7, sum_t=False, Zeuthen_flow=Zeuthen_flow, integer_charge=False, **kwargs)
L = int(plaq.tag[2:]) L = int(plaq.tag[2:])

View file

@ -104,3 +104,5 @@ def test_gf_coupling():
path = './tests//data/openqcd_test/' path = './tests//data/openqcd_test/'
prefix = 'sfqcd' prefix = 'sfqcd'
gf = pe.input.openQCD.read_gf_coupling(path, prefix, c=0.3) 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)