Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The possible way is to use convolution definition and to find symbolically the corresponding integral. This may be done without piecewise definition:

lg2=log(2).N() 
gaussian(x,x_0,FWHM,A)=A*exp(-(x-x_0)^2/(2.0*(FWHM^2/4.0*lg2)))
expdec(x,S,x_0,tau)=S/tau*exp(-(x-x_0)/tau)   
var('t, x_0, FWHM, y_0, S_1, tau_1')
assume (t>0)
subint_dec1(s,t,x_0,FWHM,a_1,tau_1)=gaussian(x=s,x_0=x_0,FWHM=FWHM,A=1)*expdec(x=t-s,x_0=x_0,S=S_1,tau=tau_1)
exp_decay=subint_dec1.integral(s,0,t)

However, the resulting function works rather slow for fitting purposes