mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 20:13:41 +02:00
Corr.fit range changed
This commit is contained in:
parent
55f42327a2
commit
6a092014c2
1 changed files with 3 additions and 3 deletions
|
@ -354,8 +354,8 @@ class Corr:
|
||||||
else:
|
else:
|
||||||
fitrange = [0, self.T]
|
fitrange = [0, self.T]
|
||||||
|
|
||||||
xs = [x for x in range(fitrange[0], fitrange[1]) if not self.content[x] is None]
|
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]) 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 = least_squares(xs, ys, function, silent=silent, **kwargs)
|
||||||
result.gamma_method()
|
result.gamma_method()
|
||||||
return result
|
return result
|
||||||
|
@ -380,7 +380,7 @@ class Corr:
|
||||||
raise Exception("no plateau range provided")
|
raise Exception("no plateau range provided")
|
||||||
if self.N != 1:
|
if self.N != 1:
|
||||||
raise Exception("Correlator must be projected before getting a plateau.")
|
raise Exception("Correlator must be projected before getting a plateau.")
|
||||||
if(all([self.content[t] is None for t in range(plateau_range[0], plateau_range[1])])):
|
if(all([self.content[t] is None for t in range(plateau_range[0], plateau_range[1] + 1)])):
|
||||||
raise Exception("plateau is undefined at all timeslices in plateaurange.")
|
raise Exception("plateau is undefined at all timeslices in plateaurange.")
|
||||||
if method == "fit":
|
if method == "fit":
|
||||||
def const_func(a, t):
|
def const_func(a, t):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue