norm in quick fit
This commit is contained in:
@@ -334,6 +334,11 @@ def quick1etau(t: ArrayLike, C: ArrayLike, n: int = 7) -> float:
|
||||
C is C(t) the correlation function
|
||||
n is the minimum number of points around 1/e required
|
||||
"""
|
||||
# norm, if t=0 provided
|
||||
if t[0] == 0:
|
||||
C /= C[0]
|
||||
C, t = C[t>0], t[t>0] # make sure t=0 is dropped
|
||||
|
||||
# first rough estimate, the closest time. This is returned if the interpolation fails!
|
||||
tau_est = t[np.argmin(np.fabs(C - np.exp(-1)))]
|
||||
# reduce the data to points around 1/e
|
||||
|
||||
Reference in New Issue
Block a user