6  Lifetime Features (Fit)

Biological samples often contain mixtures of fluorescent species, each with its own characteristic lifetime. By modeling the decay as a sum of exponentials, the analysis can separate and quantify these different contributions. For example, NADH in cells exists in both free (short lifetime, ~0.4 ns) and protein-bound (longer lifetime, ~2–3 ns) states; by fitting the fluorescence decay with a bi-exponential model, one can estimate the fraction of each state, which provides direct insight into cellular metabolism and energy production pathways.

FLIM Playground extracts cell-level lifetime fitting features in this feature extractor, including the fraction of each lifetime component (\(\alpha_i\)), their lifetimes (\(\tau_i\)), and mean lifetime (\(\tau_{mean}\)).

\[I(t) = \sum_{i=1}^n A_i \, e^{-t/\tau_i}\]

6.1 Fitting

If the decays have not been pre-fitted, FLIM Playground applies the confirmed fitting options (number of components, time gates, metric, and fitting mode) to the same reconvolution fitting process, as described in the irf shift calibration step, with the only difference being that the IRF shift is no longer a free variable to be optimized. To recap, the reconvolution fitting minimizes the difference between the measured curve and the fitted curve modeled by a multi-exponential model convolved with the IRF, quantified by the cost metric.

Otherwise, FLIM Playground uses the pre-fitted values to calculate the fitting features.

In the final dataset, fitting features are prefixed by the combination of the feature extractor name (i.e. Lifetime fit) and the channel name, allowing Data Analysis to group the features. For example, Lifetime fit_nadh: a1 means the fraction of the first lifetime component for the NAD(P)H channel.

6.1.1 Preprocessing

It sums up all the pixel decays belonging to the same cell ROI labeled by the ROI mask as one decay curve1. The ROI summing reduces variability and bias and allows for short integration times at acquisition in exchange for sub-cellular resolution (i.e., pixel-level). Users do not need to specify the bin factor (each pixel sums up the surrounding pixels’ decay curves) to account for insufficient photon counts. Also, this summing lets a single-threaded CPU application finish in a reasonable amount of time.

It also shifts the IRF using the shift values from the IRF shift calibration step. To shift an IRF, FLIM Playground upsamples the IRF 10 times using linear interpolation to fill the gaps. Then it shifts the IRF by the shift values \(\times 10\) and downsamples the IRF back to the original size.

6.1.2 Fraction of components

In addition to the absolute amplitudes of each component directly from the fitting result, FLIM Playground calculates the fraction of each component, \(\alpha_i\), as the amplitude of the component divided by the sum of all amplitudes. This normalization allows lifetime to be independent of the absolute intensity of the signal.

6.1.3 Mean lifetime

The mean lifetime, \(\tau_{mean}\), is calculated as the weighted average of the lifetimes of all components, where the weights are the fractions of each component.

\[\tau_{mean} = \sum_{i=1}^n \alpha_i \tau_i\]

6.2 Pixel-prefitted

Currently, FLIM Playground supports pixel-prefitted lifetime features from SPCImage. The pixel-level lifetime fitting features are expected to be stored in 2D arrays in spatial dimensions, with each row and column having the value of a lifetime feature outputted from SPCImage. SPCImage assigns 0 for pixels that are not fitted (e.g. thresholded out). To avoid them biasing the results, FLIM Playground uses np.ma.masked_array to create a masked array and disregards them when calculating the averages using np.ma.average.

Then it uses the ROI mask to calculate the cell-level lifetime features by averaging the pixel-level features within each ROI.

1.
Samimi, K. et al. Segmentation-guided photon pooling enables robust single cell analysis and fast fluorescence lifetime imaging microscopy. bioRxiv https://doi.org/10.1101/2025.09.30.679660 (2025) doi:10.1101/2025.09.30.679660.