A method for the fast and photon‐efficient analysis of time‐domain fluorescence lifetime image data over large dynamic ranges

Abstract Fluorescence lifetime imaging (FLIM) allows the quantification of sub‐cellular processes in situ, in living cells. A number of approaches have been developed to extract the lifetime from time‐domain FLIM data, but they are often limited in terms of speed, photon efficiency, precision or the dynamic range of lifetimes they can measure. Here, we focus on one of the best performing methods in the field, the centre‐of‐mass method (CMM), that conveys advantages in terms of speed and photon efficiency over others. In this paper, however, we identify a loss of photon efficiency of CMM for short lifetimes when background noise is present. We subsequently present a new development and generalization of CMM that provides for the rapid and accurate extraction of fluorescence lifetime over a large lifetime dynamic range. We provide software tools to simulate, validate and analyse FLIM data sets and compare the performance of our approach against the standard CMM and the commonly employed least‐square minimization (LSM) methods. Our method features a better photon efficiency than standard CMM and LSM and is robust in the presence of background noise. The algorithm is applicable to any time‐domain FLIM data set.

acquisition of many temporal gates to yield accurate measurement of the lifetime, and this leads to long acquisition times. While some methods such as rapid lifetime determination (RLD) allow video rate FLIM, 9 they are precise only over a comparatively small range of lifetimes. 10 With recent technological advancement, in particular in the complementary metal-oxide-semiconductor (CMOS) and single-photon avalanche diode (SPAD) technologies, FLIM has gained a significant improvement in temporal resolution without loss in lifetime precision, 11,12 essentially through efficient parallelization in order to circumvent pile-up effects. 13 These developments have renewed the interest in fast computational strategies and algorithms for lifetime determination. Some examples include the analogue mean-delay method for fast and precise lifetime estimation limited to single-exponential decays, 14,15 Bayesian analysis methods which offer distinct advantages when photon counts are low 16,17 and global analysis methods that estimate the global fluorescence lifetime in an image by summing photons across all pixels at the cost of losing spatial information of lifetime distributions. 8,18 One of these fast computational methods is the so-called centre-of-mass method (CMM), in which the first moment (centre-of-mass) of the fluorescence decay is used as a lifetime estimator. 19 The CMM algorithm is non-iterative, computationally efficient and has been shown to be orders of magnitude faster when compared against standard LSM techniques. 20 Owing to this faster speed, it has been implemented on-chip, for on-the-fly lifetime estimation. 21,22 In CMM, a temporal window (the analysis window) within the acquired decay time-range (the acquisition window) is chosen to compute the centre-of-mass. We recall that CMM is based on the calculation of the first moment (centre-of-mass, ) of a fluorescence decay: where ( ) = 0 e − is the fluorescence decay, is the fluorescence lifetime and the measurement window over which the signal is measured. For ≫ , ∼ as the second term vanishes, but for short measurement windows, a correction needs to be applied to infer and take into account the finite size of the measurement window. This can be achieved using either an iterative approach or a look-up table. 21 In this paper, we identify that when background noise is present, lifetimes that are short with respect to the size of the analysis window are evaluated inefficiently by the standard CMM leading to an imprecise estimation of the lifetime. Exploiting the flexibility in the choice of analysis window, we present a generalization of CMM called F3-CMM to correct for this effect by applying the fusion of three lifetime images obtained with adapted temporal analysis windows. Our approach extends the dynamic range of fluorescence lifetimes that can be analysed with CMM at high photon efficiency. The method potentially works for all time-domain FLIM data sets and could also be implemented on-chip to achieve fast and real-time FLIM analysis (millisecond timescales for standard 256×256×256 FLIM data), similar to standard CMM. 19,21 2 RESULTS

Photon efficiency of CMM and LSM lifetime estimations
To compare the performance of CMM with other commonly used analysis methods, we modelled timecorrelated single photon counting (TCSPC) data with Monte-Carlo simulations of photon arrival times (see Figure S1 and Materials and Methods for details). The software is distributed with this work and includes a Gaussian model of the instrument response function (IRF), photon noise, the effects of after-pulsing (Ap) 23 and laser repetition rate. The Ap represents the fraction of photons in the background compared to those in the decay and is here a metric of the amount of noise on the background level. The software tool allows the simulation of realistic FLIM data that can be directly imported into our analysis software described further below, or into the commonly used FLIMfit software. 8 In a previous error analysis of CMM, 19 simulations did not include the effect of background noise on algorithm performance, although background correction is an essential step in CMM. 22 Here, we use simulations for typical acquisition conditions for TCSPC (time window =25 ns, 256 time bins, a Gaussian IRF centred at 3.2 ns with a standard deviation of 150 ps and containing a total of 108 photons) to estimate the quality of the lifetime estimation of F3-CMM and compare it to the common LSM method. A useful parameter to estimate the photon efficiency of a lifetime method is the -value 24 which compares the signal-to-noise ratio (SNR) for a photon counting method to the precision of the measured lifetime: where is the total number of photons, is the fluorescence lifetime and is the standard deviation of the lifetime measurement obtained from repeated measurements. For an ideal method, the photon efficiency reaches the minimum value of = 1, for other cases > 1. Figure 1 shows fluorescence lifetime images from simulations of a sample with uniform lifetime (2.5 ns). The simulation features a gradient of photon counts (from 100 to 5000 photons) with background noise levels of Ap = 0% . When 5% after-pulsing is applied, the background is corrected by removing the average of the first ∼20 times gates for CMM and by background level fitting for LSM. Ap: after-pulsing. The analysis window used the full acquisition window: 0-25 ns and Ap = 5% and was analysed with both standard CMM and LSM methods. Figure 1C clearly shows the effect of photon noise on lifetime precision, introducing errors that increase from ∼50 to ∼300 ps as photon counts are reduced from 5000 to 100. It shows, however, that no discernible bias is introduced by the CMM estimation across the signal range investigated.
In Figure 1D, the -value is plotted as a function of photon counts, for two levels of background noise and for both LSM and CMM. We observe that CMM determines the lifetime with constant photon efficiency across the whole range of counts. When background noise is present at Ap = 5% the -value increases from ∼1 to ∼1.23 from the case where no background noise is present. The LSM method, on the other hand, has lower photon efficiency which furthermore varies with photon counts. Figure S2 shows further data from these simulations, including lifetime images, accuracy and precision plots and data used to generate the -value graphs in Figure 1D.
The -value does not take into account the potential presence of bias (loss of accuracy) as highlighted by Li et al. 19 We introduce an extension of the -value in a format that takes account of both precision and accuracy of the method: Here, Δ is the difference between the mean of the measured and simulated lifetime. In combination, the -value and ′ -value can be used as figures of merit in simulated data to investigate the overall performance of a lifetime estimation method. We then investigated the photon efficiency of the methods as a function of the lifetime extracted. Figure 2 shows plots of both and ′ -values as a function of the simulated lifetime for the CMM and LSM methods in the presence and absence of background noise, at 5% and 0% Ap, respectively. From Figure 2, we observe that the ′ -value highlights a loss of accuracy of the LSM method at short lifetimes (<500 ps). We also note that, in absence of background, CMM performs close to optimally ( ∼1) for lifetimes ranging from 0.5 to 4 ns and better than the LSM method. We note that LSM suffers more strongly from the presence of background than CMM in the lifetime range >2 ns. However, the opposite is true at shorter lifetimes (<2 ns), where the precision of the CMM lifetime estimation rapidly worsens. Figure 2 shows, however, that CMM suffers from a loss of photon efficiency at short lifetimes (here <2.5 ns). The reason for this is that, for short lifetimes, the background noise in the tail of the fluorescence decay accumulates and becomes a dominating source of error in the lifetime estimation.

F I G U R E 2
-value (A) and ′ -value (B) as a function of the simulated lifetime ( ) for the CMM and LSM methods. The TCSPC decays were simulated with 5000 photons with 5% or 0% after-pulsing background. When 5% after-pulsing is applied, the background is corrected by removing the average of the first ∼20 times gates for CMM and by background level fitting for LSM. The and ′ values were estimated from 1024 repeats. The analysis window used the full acquisition window: 0-25 ns. Ap: after-pulsing

Improvement of CMM performance by adaptive windowing
The loss of photon efficiency of CMM in the short lifetime range can be mitigated through the use of shorter analysis windows, reducing cumulative noise and thus improving the precision of the method for short lifetimes. In Figure 3A,B, we show the and ′ -values for CMM for three different analysis windows ( = 0-25 ns, 0-12.5 ns and 0-6.25 ns).
We observe that each analysis window performs optimally only for a certain range of lifetimes. However, no single analysis window performs well over the complete range of lifetimes considered here. This then highlights a problem with CMM since within a single FLIM acquisition lifetimes can vary greatly from pixel to pixel. When using a wide analysis window, a large standard deviation is obtained for short lifetimes. However, when using a small analysis window an inaccurate (biased) lifetime is obtained for long lifetimes. Here, to address this problem, we introduce F3-CMM, which combines the lifetime estimation from all three analysis windows and produces a composite lifetime image with improved precision and accuracy throughout the complete range of lifetime. The purple curve in Figure 3 was obtained from a weighted average of the results obtained from all three analysis window sizes following: where 1 , 2 and 3 correspond, respectively, to the analysis windows 25, 12.5 and 6.25 ns, are the lifetime-dependent weighting factors, computed from where is the lifetime cut-off that separates analysis windows and and is a 'blending factor' that determines the sharpness of the transition between adjacent weighting factors.
However, the weighting factors are lifetime-dependent and therefore cannot be directly computed in real data from a sample of unknown lifetime. We find that the optimal weighting factors can be well estimated from the CMM ( = 12.5 ns) as it is sufficiently accurate and precise in the region of the cut-off lifetimes (see Figure 3). Therefore, we use We note that an iterative method could be used to estimate the optimal weighting factors, instead of using the medium-size window analysis but we do not expect this to lead to a significant improvement in the lifetime estimation.
In order to determine the lifetime range appropriate for a given analysis window size (and therefore the lifetime cut-off ), we plot the ′ -value as a function of the ratio of the lifetime and the analysis window size as shown in Figure 4. This leads to a plot, the shape of which is invariant with analysis window size and which is well described by a rational function of the type This analytical description may be used to determine lifetime cut-offs between two analyses windows , defined as the lifetime where the two curves cross and therefore where represents the effective analysis window size. The parameters and are relatively insensitive to the amount of Ap (see Figure S3) and can therefore be estimated from the ′ -value plot as a function of lifetime. For all results presented here, we used: = 3.218 and = 0.07339. We first tested the performance of our method in silico, by simulating TCSPC image data with a lifetime gradient. These simulated data were subsequently analysed with F3-CMM and CMM. The results are shown in Figure 5. As expected, each of the three analysis window performs well (low noise and low bias) only in specific regions of the lifetime map. The large window ( = 0-25 ns) shows large noise at low lifetimes (0-1 ns range) and the small analysis window ( = 0-6.25 ns) has large bias towards shorter lifetime in the long lifetime region (>2 ns). F3-CMM, on the other hand, is able to estimate the lifetime correctly over the entire lifetime range.
We also generated in silico data sets to simulate challenging acquisition conditions. In Figure S4, we present a data set containing three different lifetime values (0.5, 1.5 and 3.5 ns) and variable signal photon numbers (∼20, ∼50 and ∼120, respectively, corresponding to ∼5 photons in the maximum bin in all decays) with a 5% Ap background. It is clear that F3-CMM offers improved performance over CMM and LSM analyses in terms of precision and accuracy.
We also wanted to characterize the method's performance on the cases where observed decays are incomplete, for instance when measuring long lifetimes with high repetition rate lasers. Figure S5 shows simulations of both complete and incomplete decays. In the case of the complete decay, we simulated a lifetime of 0.5 ns at a laser repetition rate of 20 MHz. For the incomplete decay, we simulated a lifetime of 5 ns at a laser repetition rate of 80 MHz. Both cases were generated in the presence of background in the form of 5% Ap, with a varying levels of photon counts from 100 to 5000 photons, as we did before. We observe that the number of photons had minimal impact on the -number in the range we considered and that F3-CMM accurately predicted the lifetimes for complete decays, with minimal biases even at high background. On the other hand, incomplete decays showed a bias towards shorter lifetimes and a high -value, as is commonly known for other CMM approaches. For analysing incomplete decays, fitting an incomplete decay model may be a more accurate approach here.

Validation of the approach on experimental data
Next, we validated the method on experimental data. For this purpose, we used lifetime calibration solutions based on Rhodamine 6G dye solutions containing varying concentrations of potassium iodide (KI) as a fluorescence quencher. 25 The calibration solutions obtained this way have been shown to provide a large range of lifetimes and allow titration of the quencher. 6,26 Here, we filled three transparent glass capillaries with varying mixtures of Rhodamine 6G and KI and imaged them side-by-side in a single field-of-view using our custom-built TCSPC confocal microscope. 27 The results are shown in Figure 6. The recovered lifetime images and the histograms demonstrate the superior performance of the F3-CMM approach, leading to sharper lifetime distributions and less noisy images compared to LSM and standard CMM. Conventional CMM leads to a broader distribution at short lifetimes (∼0.3 ns), where there is also bias, evident from the large tail extending to lifetimes beyond 3 ns (see Figure 6E). This tail is absent in the F3-CMM approach.
The means and standard deviations for the recovered lifetimes are compared in Table 1 Table 1 quantitatively highlights the photon efficiency of F3-CMM.
We also compared the performance of F3-CMM against LSM method for a set of diffraction-limited images of Convallaria majalis in Figure S6 and observed equivalent performance in terms of measured average lifetimes.

CONCLUSIONS
Our simulations and experimental data clearly show the potential of CMM and, in particular, of the F3-CMM extension as a method to accurately and precisely estimate the fluorescence lifetime from single exponential decays over a wide lifetime dynamic range. The photon efficiency (indicated by the ′ -value) is higher than for LSM for lifetime ranges typically encountered in biological fluorescence experiments, improving precision and accuracy of the lifetime determination for the same photon budget. Generally, the CMM algorithm is also compu-  tationally efficient and faster than state-of-the-art LSM implementations and has been implemented 'on-chip' with FLIM instrumentation. 19,20,28 The disadvantage of the CMM approach is that multiexponential decays cannot be distinguished and CMM will provide an estimate of an average lifetime instead. If this is desired, a global analysis and multi-exponential fitting with LSM are powerful alternatives. However, the average lifetime is often sufficiently informative to reveal functional information and, with appropriate calibration, is quantitative for the measurement of absolute ligand concentrations. 1 F3-CMM is robust with respect to changes in background noise but the parameters used to compute the weighting factors can be adjusted if exceptionally large amounts of background noise are present. F3-CMM will be especially beneficial when background noise is present in the data set, for example when using SPAD arrays, which typically feature dark count rates that are typically higher than that encountered with photomultiplier tubes or with hybrid detectors. 22 In conclusion, we have shown that using an adapted analysis window with CMM lifetime estimation leads to excellent photon efficiency with high precision and accuracy over a large range of lifetimes. We have introduced the ′ -value as a measure of overall photon efficiency that takes into account both the precision and the accuracy of the method. It also helps identifying the range of lifetimes that the method can extract with high fidelity. In addition to its high photon efficiency, the speed afforded by F3-CMM offers potential for quantitative dynamic, live cell measurement applications and for on-chip, video-rate implementation of FLIM analysis.

Monte-Carlo simulation of TCSPC data set
TCSPC data were generated using a Monte-Carlo simulations in MATLAB from the probability density functions ( ) of the photon excitation and emission times, which were represented by the instrument response function (IRF) model and the fluorescence decay model, respectively. The cumulative probability densities ( ) were calculated from the probability densities as shown in Figure S1. For the photon emission time, we used and For the Gaussian IRF, we used and where refers to excitation, refers to emission and refers to the error function. Two numbers 1 ( ) and 2 ( ) were generated by a pseudo-random number generator (PRNG) from a uniform distribution between 0 and 1 using the MATLAB function rand. These numbers were used to obtain the corresponding emission and excitation times, and , respectively, as shown in Figure S1. The photon arrival time is the sum of the two: = + . The number of photons in the background was determined from the after-pulsing ( ) and the total number of photons ( ) The background noise level was simulated by randomly distributing (uniformly distributed across the acquisition window) the background photon arrival times across the acquisition window. The + arrival times were binned to form a histogram of arrival times. Then, the arrival times beyond the acquisition window were wrapped around applying a modulo operation using the temporal period between laser pulses. The IRF was simulated by setting the emission time ( ) to zero. The simulation tool can generate a range of lifetimes and a range of photon numbers in an image of any size and then save it as 16-bit TIFF stacks using the OMERO MATLAB utilities. The simulation tool depends on the bioformats package, which is free, open-source, and easy to install from https://docs.openmicroscopy.org/bio-formats/6.1.0/ users/matlab/index.html. The TIFF stack can then be used for CMM analysis or imported into FLIMfit 8 for LSM anal-ysis. The code is available on the author's GitHub: https:// github.com/Romain-Laine/TCSPC-image-simulation.

Computation of the CMM and F3-CMM algorithms
Prior to computing the centre-of-mass, the backgrounds were removed from each decay by calculating the average of the first few time bins before the rising edge of the decay and subtracting it from the decay. Then, the lifetime extracted by CMM was estimated by calculating the centre-of-mass lifetime estimator, , of the corresponding decay with the chosen analysis window.
where ( ) is the fluorescence intensity measurement in the temporal bin and Δ is the bin size. The centreof-mass of the IRF decay was also computed in order to remove the effect of the IRF on the lifetime estimation. The CMM lifetime was then obtained by subtracting the IRF lifetime.
Then the lifetime corrected for the finite analysis window, , was computed by iterative method as follows: where is the number of iterations, is the lifetime at the th iteration, is the effective analysis window size and with 0 = . The effective analysis window is given by the difference between the total analysis window and . In practice, we noticed that 10 iterations were sufficient to obtain unbiased estimates of the lifetime within the range of lifetimes considered here, therefore = 10 . The F3-CMM is computed as described in the main text. A blending factor of = 20 was found to work well in most cases by providing a sharp transition between the lifetime images obtained from different analysis windows. The analysis script was written as an open-source Fiji 30 macro tool with the aim to integrate FLIM analysis with other versatile microscopy image analysis and make it generally more accessible to end users, in a similar spirit to FLIMJ. 29 The analysis tool is distributed on the GitHub page of the author: https://github.com/Romain-Laine/F3-CMM-FLIM-analysis.

FLIM imaging of Rhodamine 6G and Convallaria samples
Rhodamine 6G (Sigma, R4127) were prepared in increasing concentrations of KI (Sigma-Aldrich, 60400) in accordance to Hanley et al. 25 The dye and quencher mixture were freshly prepared and then used to fill up hollow rectangle capillaries (CM Scientific, ID 0.10 × 1.00 mm). The capillaries were placed side by side on the microscope stage and imaged on a custom-made TCSPC microscope as previously described. 27 An Olympus 2× objective with 0.08 NA was used. FLIM images were acquired over a 140-s integration time. For imaging of slide-mounted Convallaria majalis samples, an Olympus 60× oil immersion objective with 1.40 NA was used. The laser source was a Fianium SC400-4 set to a 20-MHz repetition rate. A 510-nm excitation wavelength and 560-nm emission wavelength (Semrock 560/25 filter) were used for both experiments. The authors would like to thank Ian Munro and Sébastien Besson for providing the code for OME-tiff export and the OME team for maintaining the Bio-Formats library. The authors would also like to thank Oliver Vanderpoorten and Súil Collins for suggesting using capillaries for the experimental data sets.