mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-07-01 09:19:27 +02:00
sinh effective mass implemented
This commit is contained in:
parent
66c443fd63
commit
117a925775
4 changed files with 28 additions and 20 deletions
|
@ -252,14 +252,21 @@ class Corr:
|
|||
|
||||
return np.log(Corr(newcontent, padding_back=1))
|
||||
|
||||
elif variant == 'periodic':
|
||||
elif variant in ['periodic', 'cosh', 'sinh']:
|
||||
if variant in ['periodic', 'cosh']:
|
||||
func = anp.cosh
|
||||
else:
|
||||
func = anp.sinh
|
||||
|
||||
def root_function(x, d):
|
||||
return func(x * (t - self.T / 2)) / func(x * (t + 1 - self.T / 2)) - d
|
||||
|
||||
newcontent = []
|
||||
for t in range(self.T - 1):
|
||||
if (self.content[t] is None) or (self.content[t + 1] is None):
|
||||
newcontent.append(None)
|
||||
else:
|
||||
func = lambda x, d: anp.cosh(x * (t - self.T / 2)) / anp.cosh(x * (t + 1 - self.T / 2)) - d
|
||||
newcontent.append(np.abs(find_root(self.content[t][0] / self.content[t + 1][0], func, guess=guess)))
|
||||
newcontent.append(np.abs(find_root(self.content[t][0] / self.content[t + 1][0], root_function, guess=guess)))
|
||||
if(all([x is None for x in newcontent])):
|
||||
raise Exception('m_eff is undefined at all timeslices')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue