Merge pull request #109 from JanNeuendorf/develop

Quick fix to m_eff()
This commit is contained in:
Fabian Joswig 2022-06-14 15:14:14 +01:00 committed by GitHub
commit 16d6e5e8e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -602,7 +602,7 @@ class Corr:
if variant == 'log': if variant == 'log':
newcontent = [] newcontent = []
for t in range(self.T - 1): for t in range(self.T - 1):
if (self.content[t] is None) or (self.content[t + 1] is None): if ((self.content[t] is None) or (self.content[t + 1] is None)) or (self.content[t + 1][0].value == 0):
newcontent.append(None) newcontent.append(None)
else: else:
newcontent.append(self.content[t] / self.content[t + 1]) newcontent.append(self.content[t] / self.content[t + 1])
@ -622,7 +622,7 @@ class Corr:
newcontent = [] newcontent = []
for t in range(self.T - 1): for t in range(self.T - 1):
if (self.content[t] is None) or (self.content[t + 1] is None): if (self.content[t] is None) or (self.content[t + 1] is None) or (self.content[t + 1][0].value == 0):
newcontent.append(None) newcontent.append(None)
# Fill the two timeslices in the middle of the lattice with their predecessors # Fill the two timeslices in the middle of the lattice with their predecessors
elif variant == 'sinh' and t in [self.T / 2, self.T / 2 - 1]: elif variant == 'sinh' and t in [self.T / 2, self.T / 2 - 1]:
@ -637,7 +637,7 @@ class Corr:
elif variant == 'arccosh': elif variant == 'arccosh':
newcontent = [] newcontent = []
for t in range(1, self.T - 1): for t in range(1, self.T - 1):
if (self.content[t] is None) or (self.content[t + 1] is None) or (self.content[t - 1] is None): if (self.content[t] is None) or (self.content[t + 1] is None) or (self.content[t - 1] is None) or (self.content[t][0].value == 0):
newcontent.append(None) newcontent.append(None)
else: else:
newcontent.append((self.content[t + 1] + self.content[t - 1]) / (2 * self.content[t])) newcontent.append((self.content[t + 1] + self.content[t - 1]) / (2 * self.content[t]))