Fluorescence lifetime imaging with LINCam, fitted with FLIMKit, an open-source FLIM toolkit that reads .photons files itself: four lifetimes describe the 284 million photons of a Convallaria majalis section, and a fit of every pixel maps its mean lifetime.
FLIMKit is an open-source Python toolkit for fluorescence lifetime imaging, developed by Alex Hunt and colleagues at the University of Edinburgh: reconvolution fitting of one or more exponentials, lifetime distributions, phasors and tile stitching, with a desktop application, a terminal interface and a Python API. It reads LINCam .photons files through photonsfile, a pure-Python reader written from the D7 format that Photonscore opened, and bins every photon by its position and arrival time into the cube it fits.
Reconvolution fitting models each decay as exponentials convolved with the instrument response. It asks for the model up front, how many lifetimes, and returns them with their amplitudes: the complement of the phasor analysis of application note 2, which fits nothing. This note fits the same recording.
Results
FLIMKit bins the 284,223,008 photons at 512 × 512 pixels and 1024 time bins of 49.2 ps. The decay of all photons (Figure 1, top right) needs four lifetimes, 0.20, 0.81, 2.55 and 5.12 ns, with amplitudes of 46, 32, 20 and 1.5 %. Each exponential added cuts the reduced χ² about tenfold, from 33,700 with one to 1,810, 203 and finally 15.3 with four, while the intensity-weighted mean lifetime stays at 2.05 to 2.06 ns.
Every pixel is then fitted with the four lifetimes held and only their amplitudes free, after 2 × 2 binning to 256 × 256: 19,653 pixels with 1000 photons or more, holding 98 % of the photons. Their intensity-weighted mean lifetime (Figure 1, bottom) separates three populations, at 1.4, 2.0 and 2.6 ns: the dim tissue, the bright band at the edge of the section, and the S-shaped group of cells in its centre.
They are the three populations application note 2 finds on the phasor plot of the same recording. Within each, FLIMKit's mean lifetime, 1.45, 2.01 and 2.59 ns, lies between the phase and the modulation lifetime PhasorPy gives the same pixels: two open-source tools, one fitting and one not, agree on the LINCam data.
Instrument response and fit window
FLIMKit takes the instrument response either measured or as a Gaussian, which the fit may shift and widen. No measured response exists for this recording, so the fit uses a Gaussian, 80 ps wide. LINCam's response has a core that narrow, and ahead of it a weak shoulder, a thousandth of the peak and some 1 ns long, which no Gaussian follows: a broader one only fits worse. So the fit starts where the decay climbs through half its peak, 10.53 ns; a measured response would let it start before the rise. Over the 34 ns that follow, the residuals stay within ten standard deviations, at up to 12 million photons a bin, but for one feature: a small peak 5.9 ns after the first, which FLIMKit could exclude from the fit and which is kept here.
FLIMKit reads a .photons file whole, some 80 bytes a photon: this recording takes 24 GB of memory.
The desktop application
FLIMKit's desktop application opens LINCam files as they are: the first 225 s of the recording, below, load in its Single FOV Fit tab and fit with the same model, up to three exponentials in its form (Figure 2). With three, at the 197 ps bins it takes by default, it finds 0.35, 1.68 and 3.80 ns and an intensity-weighted mean lifetime of 2.14 ns (the map shows the amplitude-weighted mean), against 2.06 ns from four lifetimes fitted to the whole recording above.
Sample
A section of Convallaria majalis (lily of the valley) rhizome, the usual test slide for fluorescence lifetime imaging, recorded by André Weber with a LINCam on a Nikon Eclipse Ti microscope.
Data and code
The script fit.py and the notebook fit.ipynb, with a README on how to install and run them, are on GitHub. They need FLIMKit, from PyPI; its desktop application comes from FLIMKit's releases. The recording, convallaria.photons, is the download of application note 2; its first 225 s are below, small enough for FLIMKit to open on a laptop.
FLIMKit is cited as doi:10.5281/zenodo.21931131, photonsfile as doi:10.5281/zenodo.21360199.
Acknowledgement
FLIMKit is developed in Ahsan Akram's group at the Centre for Inflammation Research, Institute for Regeneration and Repair, University of Edinburgh. We thank Alex Hunt, Ava Russell, Layla Mathieson, Zhen Yuan Yeo and Matthieu Vermeren for it, and Alex Hunt and Ahsan Akram for photonsfile, the reader that brought LINCam files to it. Their work on the reader is what moved us to publish the D7 format at last: github.com/photonscore/d7. convallaria-40M.photons 211.5 MB The first 225 s of the recording, 40,000,500 photons, each with its position and its arrival after the laser pulse as in the full file. FLIMKit opens it in some 3.5 GB of memory, where the whole recording takes 24 GB.