Let say you have a process that decays exponentially, with constant lamb
>>> t = [..] #list of times
>>> x = [x0 * math.exp(-t[i]/lamb) for i in range(n)]
Constant lamb
can be derived from vector x
>>> lamb = 1/N * sum([t[i]/math.log(x0/x[i])for i in range(n)])
>>> tau = 1/lamb = T/math.log(2) # T is the mean life time
Written with StackEdit.