mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
Merge branch 'develop' of github.com:fjosw/pyerrors into develop
This commit is contained in:
commit
2cdf94c026
4 changed files with 13 additions and 13 deletions
|
@ -14,7 +14,7 @@ class Corr:
|
|||
|
||||
Everything, this class does, can be achieved using lists or arrays of Obs.
|
||||
But it is simply more convenient to have a dedicated object for correlators.
|
||||
One often wants to add or multiply correlators of the same length at every timeslice and it is inconvinient
|
||||
One often wants to add or multiply correlators of the same length at every timeslice and it is inconvenient
|
||||
to iterate over all timeslices for every operation. This is especially true, when dealing with smearing matrices.
|
||||
|
||||
The correlator can have two types of content: An Obs at every timeslice OR a GEVP
|
||||
|
@ -317,7 +317,7 @@ class Corr:
|
|||
Parameters
|
||||
----------
|
||||
symmetric : bool
|
||||
decides whether symmertic of simple finite differences are used. Default: True
|
||||
decides whether symmetric of simple finite differences are used. Default: True
|
||||
"""
|
||||
if not symmetric:
|
||||
newcontent = []
|
||||
|
@ -415,7 +415,7 @@ class Corr:
|
|||
return np.arccosh(Corr(newcontent, padding_back=1, padding_front=1))
|
||||
|
||||
else:
|
||||
raise Exception('Unkown variant.')
|
||||
raise Exception('Unknown variant.')
|
||||
|
||||
def fit(self, function, fitrange=None, silent=False, **kwargs):
|
||||
"""Fits function to the data
|
||||
|
@ -433,7 +433,7 @@ class Corr:
|
|||
if self.N != 1:
|
||||
raise Exception("Correlator must be projected before fitting")
|
||||
|
||||
# The default behaviour is:
|
||||
# The default behavior is:
|
||||
# 1 use explicit fitrange
|
||||
# if none is provided, use the range of the corr
|
||||
# if this is also not set, use the whole length of the corr (This could come with a warning!)
|
||||
|
@ -451,7 +451,7 @@ class Corr:
|
|||
return result
|
||||
|
||||
def plateau(self, plateau_range=None, method="fit"):
|
||||
""" Extract a plateu value from a Corr object
|
||||
""" Extract a plateau value from a Corr object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
@ -582,7 +582,7 @@ class Corr:
|
|||
return
|
||||
|
||||
def dump(self, filename):
|
||||
"""Dumps the Corr into a pickel file
|
||||
"""Dumps the Corr into a pickle file
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
|
|
@ -21,7 +21,7 @@ class Fit_result(Sequence):
|
|||
----------
|
||||
fit_parameters : list
|
||||
results for the individual fit parameters,
|
||||
also accesible via indices.
|
||||
also accessible via indices.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
|
@ -427,7 +427,7 @@ def _standard_fit(x, y, func, silent=False, **kwargs):
|
|||
raise Exception('x and y input have to have the same length')
|
||||
|
||||
if len(x.shape) > 2:
|
||||
raise Exception('Unkown format for x values')
|
||||
raise Exception('Unknown format for x values')
|
||||
|
||||
if not callable(func):
|
||||
raise TypeError('func has to be a function.')
|
||||
|
|
|
@ -175,7 +175,7 @@ def inv(x):
|
|||
|
||||
|
||||
def cholesky(x):
|
||||
"""Cholesky decompostion of Obs or CObs valued matrices."""
|
||||
"""Cholesky decomposition of Obs or CObs valued matrices."""
|
||||
return _mat_mat_op(anp.linalg.cholesky, x)
|
||||
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class Obs:
|
|||
samples : list
|
||||
list of numpy arrays containing the Monte Carlo samples
|
||||
names : list
|
||||
list of strings labeling the indivdual samples
|
||||
list of strings labeling the individual samples
|
||||
idl : list, optional
|
||||
list of ranges or lists on which the samples are defined
|
||||
means : list, optional
|
||||
|
@ -314,9 +314,9 @@ class Obs:
|
|||
deltas : list
|
||||
List of fluctuations
|
||||
idx : list
|
||||
List or range of configs on which the deltas are defined.
|
||||
List or range of configurations on which the deltas are defined.
|
||||
shape : int
|
||||
Number of configs in idx.
|
||||
Number of configurations in idx.
|
||||
w_max : int
|
||||
Upper bound for the summation window.
|
||||
fft : bool
|
||||
|
@ -1109,7 +1109,7 @@ def _reduce_deltas(deltas, idx_old, idx_new):
|
|||
Has to be a subset of idx_old.
|
||||
"""
|
||||
if not len(deltas) == len(idx_old):
|
||||
raise Exception('Lenght of deltas and idx_old have to be the same: %d != %d' % (len(deltas), len(idx_old)))
|
||||
raise Exception('Length of deltas and idx_old have to be the same: %d != %d' % (len(deltas), len(idx_old)))
|
||||
if type(idx_old) is range and type(idx_new) is range:
|
||||
if idx_old == idx_new:
|
||||
return deltas
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue