test: test for Corr.fit added

This commit is contained in:
Fabian Joswig 2021-12-08 22:37:38 +00:00
parent 083247389b
commit a9e80989fe

View file

@ -79,6 +79,18 @@ def test_T_symmetry():
T_symmetric = my_corr.T_symmetry(my_corr)
def test_fit_correlator():
my_corr = pe.correlators.Corr([pe.pseudo_Obs(1.01324, 0.05, 't'), pe.pseudo_Obs(2.042345, 0.0004, 't')])
def f(a, x):
y = a[0] + a[1] * x
return y
fit_res = my_corr.fit(f)
assert fit_res[0] == my_corr[0]
assert fit_res[1] == my_corr[1] - my_corr[0]
def test_utility():
corr_content = []
for t in range(8):