lifetime#

lifetime(odf, corrtime)[source]#

Calculate the bond lifetime by fitting the time correlation function.

Fits the TCF with a double-exponential decay model using a bounded least-squares approach. The average lifetime is computed as the weighted sum of the characteristic decay times.

Parameters:
odfpd.DataFrame

Input DataFrame containing “t [ps]” and “TCF” columns.

corrtimefloat

A characteristic time scale used for the initial optimization guess.

Returns:
taufloat

The calculated average bond lifetime.

pnp.ndarray

The optimized fit parameters: [A1, tau1, tau2].

Notes

The fitting function used is: $$f(x) = A_1 cdot exp(-x / tau_1) + (1 - A_1) cdot exp(-x / tau_2)$$