I would like to fit the fluorescent lifetime curve. These curves are defined by the convolution of the instrument response function (IRF accepted by Gaussian) and the exponential flow rate (multi):

Where G is Gaussian and F-exponential decay. I tried installing this in python using lmfit.minimize, with the following functions:
def gaus(t, gamp, gwidth, gtoff): i = gamp*math.exp(-(t-gtoff)**2/gwidth) return i def exp1(t, expamp, exptime, exptoff): i = expamp*math.exp((t-exptoff)/(exptime)) return i def func1(t, gamp, gwidth, gtoff, expamp1, exptime1, exptoff1): i = [(scipy.integrate.quad(lambda Tpr: gaus((ti - Tpr), gamp, gwidth, gtoff)*exp1(ti, expamp1, exptime1, exptoff1), 0, ti))[0] for ti in t] return i
In cases where gaus determines the response function by a Gaussian instrument, exp1 is the only exponential decay. func1 computes the convolution between them using scipy.integrate, the return values ββare used to calculate the difference between the fit and the data based on a set of parameters:
def fitfunc(params, x, data): ..getting parameters part here.. values = func1(t, gamp, gwidth, toff, expamp1, exptime1, toff) return values - data result = lmfit.minimize(fitfunc, fit_params, args = (t, test))
Despite such work, the fitting process is very slow and has not yet given me any reasonable approaches.
There are several approaches to circumventing the convolution process using Fourier transforms or iterative deconvolution. Origin seems to know how to do this, but it's hard for me to understand the procedures.
As far as I can tell, iterative deconvolution works by deconvolving a signal with a guessed Gaussian function, and then fitting the result, and then adjusting the Gaussian.
The Fourier transform approach will be based on the principle that convolution in real space corresponds to multiplication in the Fourier region, which will reduce the computation time. I assume that it will be the Fourier transform of the signal corresponding to this, and then the Fourier transform back.
I would like information on how to implement these methods in python numpy / scipy. Iterative deconvolution is perhaps the easiest task, so maybe I should start with this. On the other hand, from what I read, the Fourier method should be faster and more reliable. However, I do not know how to perform the fitting on the Fourier transformed result.