Skip to content

Latest commit

 

History

History
94 lines (73 loc) · 3.65 KB

theory.rst

File metadata and controls

94 lines (73 loc) · 3.65 KB

Theory

pycorrelate.pycorrelate

Cross-correlation of point processes

In fluorescence correlation spectroscopy (FCS) the (normalized) cross-correlation function (CCF) of two continuous signals I1(t) and I2(t) is defined as:

$$G(\tau) = \frac{\langle I_1(t)\; I_2(t) \rangle} {\langle I_1(t)\rangle\langle I_2(t) \rangle}$$

The auto-correlation function (ACF) is just a special case where I1(t) = I2(t).

In actual experiments, signals are not continuous but come from single-photon detectors that produce a pulse for each photon. These pulses are usually timestamped with ~10ns resolution. The series of photon arrival times is used as input for ACF or CCF computations.

In principle, timestamps can be binned to produce a discrete-time signal. In signal processing, the (non-normalized) cross-correlation of two real discrete-time signals {Ai} and {Bi} is defined as

$$c[k] = \sum_{i=0}^{N} A[i]\ B[i+k].$$

The previous formula is implemented by ucorrelate and numpy.correlate.

Binning timestamps to obtain timetraces would be very inefficient for FCS analysis where time-lags spans may orders of magnitude. It is much more efficient to directly compute the cross-correlation function from timestamps. The popular multi-tau algorithm allows computing the correlation directly from timestamps on a fixed arrangement of quasi-log-spaced bins. More generally, Laurence algorithm (Laurence et al. Optics Letters (2006)) allows computing cross-correlation from timestamps on arbitrary bins of time-lags, with similar performances as the multi-tau. Computing cross-correlation C(τ) from timestamps is fundamentally a counting tasks. Given two timestamps arrays t and u and considering the k-th time-lag bin [τk, τk + 1), C(k) is the number of pairs where:


τk ≤ ti − uj < τk + 1

for all the possible i and j combinations.

$$C(k) = \frac{n(\{(i,j) \ni t_i < u_i - \Delta\tau_k\})}{\Delta\tau_k}$$

where n({}) is the operator counting the elements in a set, Δτk is the duration of the k-th time-lag bin and T is the measurement duration. For FCS we normally want the normalized CCF, that is:

$$G(k) = \frac{n(\{(i,j) \ni t_i < u_i - \Delta\tau_k\})} {n(\{i \ni t_i \le T - \Delta\tau_k\})\:n(\{j \ni u_j \ge \Delta\tau_k\})} \frac{(T-\Delta\tau_k)}{\Delta\tau_k}$$

Eq. Ck and Gk are implemented by pcorrelate, where the argument normalize allows choosing between the normalized and unnormalized version.

Note

In Laurence 2006 the expression for G(k) (there called CAB(τ)) does not include the Δτk in the denominator due to a typo.

References