mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 06:40:24 +01:00
test: test for Corr.fit added
This commit is contained in:
parent
083247389b
commit
a9e80989fe
1 changed files with 12 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue