# FRET Correction Formulas¶

The `fretmath` module contains functions to compute corrected FRET efficiency from the proximity ratio and vice-versa.

For derivation see notebook: “Derivation of FRET and S correction formulas.ipynb” (link).

fretbursts.fretmath.correct_E_gamma_leak_dir(Eraw, gamma=1, leakage=0, dir_ex_t=0)

Compute corrected FRET efficiency from proximity ratio `Eraw`.

For the inverse function see `uncorrect_E_gamma_leak_dir()`.

Parameters:
• Eraw (float or array) – proximity ratio (only background correction, no gamma, leakage or direct excitation)

• gamma (float) – gamma factor

• leakage (float) – leakage coefficient

• dir_ex_t (float) – coefficient expressing the direct excitation as n_dir = dir_ex_t * (na + gamma*nd). In terms of physical parameters it is the ratio of acceptor over donor absorption cross-sections at the donor-excitation wavelength.

Returns

Corrected FRET effciency

fretbursts.fretmath.correct_S(Eraw, Sraw, gamma, leakage, dir_ex_t)

Correct S values for gamma, leakage and direct excitation.

Parameters:
• Eraw (scalar or array) – uncorrected (“raw”) E after only background correction (no gamma, leakage or direct excitation).

• Sraw (scalar or array) – uncorrected (“raw”) S after only background correction (no gamma, leakage or direct excitation).

• gamma (float) – gamma factor.

• leakage (float) – donor emission leakage into the acceptor channel.

• dir_ex_t (float) – direct acceptor excitation by donor laser. Defined as `n_dir = dir_ex_t * (na + g nd)`. The dir_ex_t coefficient is the ratio between D and A absorption cross-sections at the donor-excitation wavelength.

Returns

Corrected S (stoichiometry), same size as `Sraw`.

fretbursts.fretmath.dir_ex_correct_E(Eraw, dir_ex_t)

Apply direct excitation correction to the uncorrected FRET `Eraw`.

The coefficient `dir_ex_t` expresses the direct excitation as n_dir = dir_ex_t * (na + gamma*nd). In terms of physical parameters it is the ratio of acceptor over donor absorption cross-sections at the donor-excitation wavelength.

For the inverse see `dir_ex_uncorrect_E()`.

fretbursts.fretmath.dir_ex_uncorrect_E(E, dir_ex_t)

Reverse direct excitation correction and return uncorrected FRET.

For the inverse see `dir_ex_correct_E()`.

fretbursts.fretmath.gamma_correct_E(Eraw, gamma)

Apply gamma correction to the uncorrected FRET `Eraw`.

For the inverse see `gamma_uncorrect_E()`.

fretbursts.fretmath.gamma_uncorrect_E(E, gamma)

Reverse gamma correction and return uncorrected FRET.

For the inverse see `gamma_correct_E()`.

fretbursts.fretmath.leakage_correct_E(Eraw, leakage)

Apply leakage correction to the uncorrected FRET `Eraw`.

For the inverse see `leakage_uncorrect_E()`.

fretbursts.fretmath.leakage_uncorrect_E(E, leakage)

Reverse leakage correction and return uncorrected FRET.

For the inverse see `leakage_correct_E()`.

fretbursts.fretmath.test_fretmath()

Run a few consistency checks for the correction functions.

fretbursts.fretmath.uncorrect_E_gamma_leak_dir(E, gamma=1, leakage=0, dir_ex_t=0)

Compute proximity ratio from corrected FRET efficiency `E`.

This function is the inverse of `correct_E_gamma_leak_dir()`.

Parameters:
• E (float or array) – corrected FRET efficiency

• gamma (float) – gamma factor

• leakage (float) – leakage coefficient

• dir_ex_t (float) – direct excitation coefficient expressed as n_dir = dir_ex_t * (na + gamma*nd). In terms of physical parameters it is the ratio of absorption cross-section at donor-excitation wavelengths of acceptor over donor.

Returns

Proximity ratio (reverses gamma, leakage and direct excitation)

fretbursts.fretmath.uncorrect_S(E_R, S, gamma, L_k, d_dirT)

Function used to test `correct_S()`.