Background Estimation

\label{sec:bg_calc}

The first step of smFRET analysis involves estimating background rates. For example, the following command:

d.calc_bg(bg.exp_fit, time_s=30,
          tail_min_us='auto')

estimates the background rates in windows of 30 s using the default iterative algorithm for choosing the fitting threshold (section \ref{sec:bg_intro}). Beginner users can simply use the previous command and proceed to burst search (section \ref{sec:burstsearch}). For more advanced users, this section provides details on the different background estimation and plotting functions provided by FRETBursts.

First, we show how to estimate the background every 30 s, using a fixed inter-photon delay threshold of 2 ms (the same for all photon streams):

d.calc_bg(bg.exp_fit, time_s=30, tail_min_us=2000)

The first argument (bg.exp_fit ) is the function used to fit the background rate for each photon stream (see section \ref{sec:bg_intro}). The function bg.exp_fit estimates the background using a maximum likelihood estimation (MLE) of the delays distribution. The second argument, time_s , is the duration of the background period (section \ref{sec:bg_intro}) and the third, tail_min_us , is the minimum inter-photon delay to use when fitting the distribution to the specified model function. To use different thresholds for each photon stream we pass a tuple (i.e. a comma-separated list of values, link) instead of a scalar. However, the recommended approach is to choose the threshold automatically using tail_min_us='auto' . This approach uses an heuristic algorithm described in the Background estimation section of the μs-ALEX tutorial (link). Finally, it is possible to use a rigorous but slower approach to find an optimal threshold, as described in SI \ref{sec:bg_opt_th}.

FRETBursts provides two kinds of plots to represent the background. One shows the histograms of inter-photon delays compared to the fitted exponential distribution, shown in figure \ref{fig:bg_dist_all}) (see section \ref{sec:bg_intro} for details on the inter-photon distribution). This plot is created with the command:

dplot(d, hist_bg, period=0)

This command illustrates the general form of a plotting commands in FRETBursts, as described in SI \ref{sec:plotting}. Here we only note that the argument period is an integer specifying the background period to be plotted (when omitted, the default is 0, i.e. the first period). Figure \ref{fig:bg_dist_all} allows to quickly identify pathological cases where the background fitting procedure returns unreasonable values.

The second background-related plot represents a timetrace of background rates, as shown in figure \ref{fig:bg_timetrace}. This plot allows monitoring background rate variations occurring during the measurement and is obtained with the command:

dplot(d, timetrace_bg)

Normally, samples should have a fairly constant background rate as a function of time as in figure \ref{fig:bg_timetrace}(a). However, sometimes, non-ideal experimental conditions can yield a time-varying background rate, as illustrated in figure \ref{fig:bg_timetrace}(b). A possible reason for the observed behavior could be buffer evaporation from an open sample (we strongly recommend using a sealed observation chamber whenever possible). Additionally, cover-glass impurities can contribute to the background. These impurities tend to bleach on timescales of minutes resulting in background variations during the course of the measurement.

Python details

The estimated background rates are stored in the Data attributes bg_dd , bg_ad and bg_aa , corresponding to photon streams Ph_sel(Dex='Dem') , Ph_sel(Dex='Aem') and Ph_sel(Aex='Aem') respectively. These attributes are lists of arrays (one array per excitation spot). The arrays contain the estimated background rates in the different time windows (background periods). Additional background fitting functions (e.g. least-square fitting of inter-photon delay histogram) are available in bg namespace (i.e. the background module, link).