mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
further docstrings updated
This commit is contained in:
parent
56e1425835
commit
b90caa4cdc
2 changed files with 19 additions and 10 deletions
|
@ -79,16 +79,16 @@ class Corr:
|
|||
else:
|
||||
raise Exception("Reweighting status of correlator corrupted.")
|
||||
|
||||
def gamma_method(self):
|
||||
def gamma_method(self, **kwargs):
|
||||
"""Apply the gamma method to the content of the Corr."""
|
||||
for item in self.content:
|
||||
if not(item is None):
|
||||
if self.N == 1:
|
||||
item[0].gamma_method()
|
||||
item[0].gamma_method(**kwargs)
|
||||
else:
|
||||
for i in range(self.N):
|
||||
for j in range(self.N):
|
||||
item[i, j].gamma_method()
|
||||
item[i, j].gamma_method(**kwargs)
|
||||
|
||||
# We need to project the Correlator with a Vector to get a single value at each timeslice.
|
||||
# The method can use one or two vectors.
|
||||
|
@ -238,7 +238,15 @@ class Corr:
|
|||
return Corr(self.content[::-1])
|
||||
|
||||
def correlate(self, partner):
|
||||
"""Correlate the correlator with another correlator or Obs"""
|
||||
"""Correlate the correlator with another correlator or Obs
|
||||
|
||||
Parameters
|
||||
----------
|
||||
partner : Obs or Corr
|
||||
partner to correlate the correlator with.
|
||||
Can either be an Obs which is correlated with all entries of the
|
||||
correlator or a Corr of same length.
|
||||
"""
|
||||
new_content = []
|
||||
for x0, t_slice in enumerate(self.content):
|
||||
if t_slice is None:
|
||||
|
@ -350,10 +358,11 @@ class Corr:
|
|||
Parameters
|
||||
----------
|
||||
variant : str
|
||||
log: uses the standard effective mass log(C(t) / C(t+1))
|
||||
cosh : Use periodicitiy of the correlator by solving C(t) / C(t+1) = cosh(m * (t - T/2)) / cosh(m * (t + 1 - T/2)) for m.
|
||||
log : uses the standard effective mass log(C(t) / C(t+1))
|
||||
cosh, periodic : Use periodicitiy of the correlator by solving C(t) / C(t+1) = cosh(m * (t - T/2)) / cosh(m * (t + 1 - T/2)) for m.
|
||||
sinh : Use anti-periodicitiy of the correlator by solving C(t) / C(t+1) = sinh(m * (t - T/2)) / sinh(m * (t + 1 - T/2)) for m.
|
||||
See, e.g., arXiv:1205.5380
|
||||
arccosh : Uses the explicit form of the symmetrized correlator (not recommended)
|
||||
guess : float
|
||||
guess for the root finder, only relevant for the root variant
|
||||
"""
|
||||
|
|
|
@ -333,10 +333,6 @@ class Obs:
|
|||
|
||||
return gamma
|
||||
|
||||
def print(self, level=1):
|
||||
warnings.warn("Method 'print' renamed to 'details'", DeprecationWarning)
|
||||
self.details(level > 1)
|
||||
|
||||
def details(self, ens_content=True):
|
||||
"""Output detailed properties of the Obs.
|
||||
|
||||
|
@ -370,6 +366,10 @@ class Obs:
|
|||
m = max(map(len, list(self.e_content.keys()))) + 1
|
||||
print('\n'.join([' ' + key.rjust(m) + ': ' + str(value) for key, value in sorted(self.e_content.items())]))
|
||||
|
||||
def print(self, level=1):
|
||||
warnings.warn("Method 'print' renamed to 'details'", DeprecationWarning)
|
||||
self.details(level > 1)
|
||||
|
||||
def is_zero_within_error(self, sigma=1):
|
||||
"""Checks whether the observable is zero within 'sigma' standard errors.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue