feat: calls to the gamma_method removed in Corr.__init__ and other

method of the Corr class. Test adjusted by adding additional calls to
the gamma_method
This commit is contained in:
Fabian Joswig 2022-02-15 13:25:01 +00:00
parent a0753fa984
commit 5f86aaba4b
2 changed files with 5 additions and 6 deletions

View file

@ -97,8 +97,6 @@ class Corr:
self.T = len(self.content)
self.prange = prange
self.gamma_method()
def __getitem__(self, idx):
"""Return the content of timeslice idx"""
if self.content[idx] is None:
@ -139,8 +137,6 @@ class Corr:
if self.N == 1:
raise Exception("Trying to project a Corr, that already has N=1.")
self.gamma_method()
if vector_l is None:
vector_l, vector_r = np.asarray([1.] + (self.N - 1) * [0.]), np.asarray([1.] + (self.N - 1) * [0.])
elif(vector_r is None):
@ -642,7 +638,6 @@ class Corr:
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]
result = least_squares(xs, ys, function, silent=silent, **kwargs)
result.gamma_method()
return result
def plateau(self, plateau_range=None, method="fit"):
@ -673,7 +668,6 @@ class Corr:
return self.fit(const_func, plateau_range)[0]
elif method in ["avg", "average", "mean"]:
returnvalue = np.mean([item[0] for item in self.content[plateau_range[0]:plateau_range[1] + 1] if item is not None])
returnvalue.gamma_method()
return returnvalue
else: