mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
Added tests for t0 and qtop
This commit is contained in:
parent
78254020f8
commit
cf137e2843
4 changed files with 47 additions and 3 deletions
|
@ -47,3 +47,49 @@ def test_openqcd():
|
|||
assert(rwfo[0].idl[repname] == range(1, 10))
|
||||
rwfo = pe.input.openQCD.read_rwms(path, prefix, version='2.0', files=files, names=names, r_start=[1], r_stop=[8])
|
||||
assert(rwfo[0].idl[repname] == range(1, 9))
|
||||
|
||||
# Qtop
|
||||
|
||||
qtop = pe.input.openQCD.read_qtop(path, prefix, c=0.3, version='sfqcd')
|
||||
repname = list(qtop.idl.keys())[0]
|
||||
qtop = pe.input.openQCD.read_qtop(path, prefix, c=0.3, version='sfqcd', Zeuthen_flow=True, L=4)
|
||||
qi = pe.input.openQCD.read_qtop(path, prefix, c=0.3, version='sfqcd', integer_charge=True)
|
||||
for conf in range(len(qi.idl[repname])):
|
||||
assert(0 == qi.r_values[repname] + qi.deltas[repname][conf])
|
||||
|
||||
qtop = pe.input.openQCD.read_qtop(path, prefix, c=0.0, version='sfqcd')
|
||||
assert (np.isclose(-4.572999e-02, qtop.r_values[repname] + qtop.deltas[repname][0]))
|
||||
qtop = pe.input.openQCD.read_qtop(path, prefix, c=0.28, version='sfqcd')
|
||||
assert (np.isclose(3.786893e-02, qtop.r_values[repname] + qtop.deltas[repname][0]))
|
||||
qtop = pe.input.openQCD.read_qtop(path, prefix, c=0.08, version='sfqcd', Zeuthen_flow=True)
|
||||
assert (np.isclose(3.653140e-02, qtop.r_values[repname] + qtop.deltas[repname][1]))
|
||||
qtop = pe.input.openQCD.read_qtop(path, prefix, c=0.40, version='sfqcd', Zeuthen_flow=True)
|
||||
assert (np.isclose(2.745865e-01, qtop.r_values[repname] + qtop.deltas[repname][1]))
|
||||
|
||||
qtop = pe.input.openQCD.read_qtop(path, prefix, c=0.40, version='sfqcd', Zeuthen_flow=True, r_start=[2])
|
||||
assert(qtop.idl[repname] == range(2, 7))
|
||||
assert (np.isclose(2.745865e-01, qtop.r_values[repname] + qtop.deltas[repname][0]))
|
||||
|
||||
qtop = pe.input.openQCD.read_qtop(path, prefix, c=0.40, version='sfqcd', Zeuthen_flow=True, r_stop=[5])
|
||||
assert(qtop.idl[repname] == range(1, 6))
|
||||
|
||||
names = ['sfqcd|r1']
|
||||
files = ['sfqcdr1.gfms.dat']
|
||||
qs = pe.input.openQCD.read_qtop_sector(path, '', 0.3, target=0, Zeuthen_flow=True, version='sfqcd')
|
||||
|
||||
assert((pe.input.openQCD.qtop_projection(qi, target=0) - qs).is_zero())
|
||||
|
||||
# t0
|
||||
|
||||
prefix = 'openqcd'
|
||||
t0 = pe.input.openQCD.extract_t0(path, prefix, dtr_read=3, xmin=0, spatial_extent=4)
|
||||
files = ['openqcd2r1.ms.dat']
|
||||
names = ['openqcd2|r1']
|
||||
t0 = pe.input.openQCD.extract_t0(path, '', dtr_read=3, xmin=0, spatial_extent=4, files=files, names=names, fit_range=2)
|
||||
t0 = pe.input.openQCD.extract_t0(path, prefix, dtr_read=3, xmin=0, spatial_extent=4, r_start=[1])
|
||||
repname = list(rwfo[0].idl.keys())[0]
|
||||
assert(t0.idl[repname] == range(1, 10))
|
||||
t0 = pe.input.openQCD.extract_t0(path, prefix, dtr_read=3, xmin=0, spatial_extent=4, r_start=[2], r_stop=[8])
|
||||
repname = list(rwfo[0].idl.keys())[0]
|
||||
assert(t0.idl[repname] == range(2, 9))
|
||||
t0 = pe.input.openQCD.extract_t0(path, prefix, dtr_read=3, xmin=0, spatial_extent=4, fit_range=2, plaquette=True, assume_thermalization=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue