Merge branch 'develop' into documentation

This commit is contained in:
fjosw 2021-12-08 22:38:04 +00:00
commit 42843ac783
3 changed files with 15 additions and 1 deletions

View file

@ -6,6 +6,8 @@ on:
- master
- develop
pull_request:
schedule:
- cron: '0 4 * * *'
jobs:
pytest:

View file

@ -443,7 +443,7 @@ class Corr:
if self.prange:
fitrange = self.prange
else:
fitrange = [0, self.T]
fitrange = [0, self.T - 1]
xs = [x for x in range(fitrange[0], fitrange[1] + 1) if not self.content[x] is None]
ys = [self.content[x][0] for x in range(fitrange[0], fitrange[1] + 1) if not self.content[x] is None]

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):