Multi-exponetional fitting of TCSPC histograms based on full reconvolution method on PicoQuant single point PTU files
With this script you can fit TCSPC lifetime histograms to single, double or triple order exponential fit with reconvolution method Minimalization method are NLLS / MLE-Nelder-Mead minimalisation methods. Batchwise proccessing, select 1 or multiple files via the GUI. And data is imported via the PTUreader
The script is developed and tested on Python 3.11, Install:
- wx python 4.2.1 for the file selector app
- PTU file reader:
- pandas
- lmfit
- scipy
- Select SPAD channel from PTU file (Channel)
- Limit number of photos in the file (photons)
- Limit/set histogram peak value (peak_lim)
- Long lifetime/phosforence remove 2nd photon afer APD deadtime recovery (Drop_multi_AC_count)
- Fitting Methods: NLLS or MLE (method)
- Fit order 'single, 'double' or 'triple' (fit_order)
- Fixing any of the fitting parameters. (set in lmfit params)
- Fitting boundaries can set. (set in lmfit params)
- IRF from experimental file or Automatic reconstruction. (irf_source)
Output shows exp fit components and intensity weighted average lifetime.
CSV output of decays → time [ns], IRF, TCSPC decay, fit, residuals. CSV output of fit values over all proccessed files → file,t1,t2,t3,tav,a1,a2,a3
Figure 1: File exponential fitting output summary
Figure 2: visual on Automatic IRF reconstruction.
Copyright Robert Molenaar, 2 August 2024
Update 240806: included 4-order exp fitting and channel autodetect.
Keywords: PTU, Picoquant, fluorescent lifetime, reconvolution, TCSPC