Merge branch 'develop' into documentation

This commit is contained in:
fjosw 2022-02-08 14:32:24 +00:00
commit 71d9707b55
2 changed files with 18 additions and 4 deletions

View file

@ -350,8 +350,8 @@ class Corr:
new_content.append(array.copy())
def wrap(i):
if i >= self.T:
return i - self.T
while i >= self.T:
i -= self.T
return i
for t in range(self.T):

View file

@ -207,7 +207,7 @@ def test_matrix_corr():
corr_ab = _gen_corr(0.5)
corr_mat = pe.Corr(np.array([[corr_aa, corr_ab], [corr_ab, corr_aa]]))
corr_mat.smearing(0, 0)
corr_mat.item(0, 0)
vec_0 = corr_mat.GEVP(0, 0)
vec_1 = corr_mat.GEVP(0, 0, state=1)
@ -221,6 +221,8 @@ def test_matrix_corr():
corr_mat.GEVP(0, 0, sorted_list="Eigenvalue")
corr_mat.GEVP(0, 0, sorted_list="Eigenvector")
corr_mat.matrix_symmetric()
with pytest.raises(Exception):
corr_mat.plottable()
@ -240,4 +242,16 @@ def test_matrix_corr():
corr_mat.plateau([2, 4])
with pytest.raises(Exception):
corr_o.smearing(0, 0)
corr_o.item(0, 0)
def test_hankel():
corr_content = []
for t in range(8):
exponent = 1.2
corr_content.append(pe.pseudo_Obs(2 + t ** exponent, 0.2, 't'))
corr = pe.Corr(corr_content)
corr.Hankel(2)
corr.Hankel(6, periodic=True)