fluopy.formulas

Mathematical formulas for optical and spectral properties.

Functions

convert_wavenumber_wavelength_frequency(...)

Convert either wavenumber, wavelength or frequency into the other two.

calculate_photon_flux(...)

Calculates the photon flux based on the irradiance and the frequency of the light.

calculate_excitation_rate(...)

Returns the excitation rate for a given irradiance and an extinction coefficient or

calculate_emission_rate(...)

Returns the rate of fluorescent emission based on the quantum yield and the

calculate_internal_conversion_rate(...)

Calculates the rate of internal conversion from the first excited state to the

henderson_hasselbalch_equation(→ float)

Returns the estimated concentration of the base given the total concentration.

calculate_pet_rate(→ float)

Returns the dSTORM reduction rate for a given reducing agent and its concentration.

calculate_spectral_overlap_integral(→ float)

Calculates the spectral overlap integral defined as the integral of the

calculate_fret_rate(→ float)

Calculates the Förster resonance energy transfer rate.

calculate_fret_efficiency(→ float)

Calculates the FRET efficiency.

calculate_photon_collection_rate(→ float)

Calculates the photon collection rate based on the numerical aperture of the

Module Contents

fluopy.formulas.convert_wavenumber_wavelength_frequency(wavenumber: float | numpy.typing.ArrayLike | None = None, wavelength: float | numpy.typing.ArrayLike | None = None, frequency: float | numpy.typing.ArrayLike | None = None) tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64]][source]

Convert either wavenumber, wavelength or frequency into the other two.

Parameters:
  • wavenumber – In 1/cm.

  • wavelength – In nm.

  • frequency – In Hz.

Returns:

(wavenumber in 1/cm, wavelength in nm, frequency in Hz)

Return type:

tuple[npt.NDArray[np.float64]]

fluopy.formulas.calculate_photon_flux(irradiance: float | numpy.typing.ArrayLike = 2, frequency: float | numpy.typing.ArrayLike = 450000000000000.0) numpy.typing.NDArray[numpy.float64][source]

Calculates the photon flux based on the irradiance and the frequency of the light.

Parameters:
  • irradiance – The irradiance in kW/cm².

  • frequency – The frequency in Hz.

Returns:

The photon flux in 1/(m² s).

Return type:

npt.NDArray[np.float64]

fluopy.formulas.calculate_excitation_rate(photon_flux: float | numpy.typing.ArrayLike = 8e+25, extinction_coefficient: float | numpy.typing.ArrayLike | None = None, absorption_cross_section: float | numpy.typing.ArrayLike | None = None) float | numpy.typing.NDArray[numpy.float64][source]

Returns the excitation rate for a given irradiance and an extinction coefficient or an absorption cross section.

Parameters:
  • photon_flux – The photon flux in 1/(m² s).

  • extinction_coefficient – Extinction coefficient of fluorophore at wavelength in 1/(cm M).

  • absorption_cross_section – Absorption cross section of fluorophore at wavelength in cm². The scattering cross section is assumed to be negligible, hence the absorption cross section equals the excitation cross section.

Returns:

The excitation rate in 1/s.

Return type:

float | npt.NDArray[np.float64]

fluopy.formulas.calculate_emission_rate(quantum_yield: float | numpy.typing.ArrayLike = 0.5, fluorescence_lifetime: float | numpy.typing.ArrayLike = 1e-09) float | numpy.typing.NDArray[numpy.float64][source]

Returns the rate of fluorescent emission based on the quantum yield and the fluorescence lifetime.

Parameters:
  • quantum_yield – Number between 0 and 1.

  • fluorescence_lifetime – The fluorescence lifetime in s.

Returns:

The rate of emission in 1/s.

Return type:

float | npt.NDArray[np.float64]

fluopy.formulas.calculate_internal_conversion_rate(quantum_yield: float | numpy.typing.ArrayLike = 0.5, emission_rate: float | numpy.typing.ArrayLike = 500000000.0, *other_outgoing_rates_args: float, **other_outgoing_rates_kwargs: float) float | numpy.typing.NDArray[numpy.float64][source]

Calculates the rate of internal conversion from the first excited state to the vibrationally excited but electronic ground state.

Parameters:
  • quantum_yield – Number between 0 and 1.

  • emission_rate – The rate of emission in 1/s.

  • other_outgoing_rates_args – Rates of all other transitions (except fluorescence emission) that leave the first excited state in 1/s.

  • other_outgoing_rates_kwargs – Rates of all other transitions (except fluorescence emission) that leave the first excited state in 1/s.

Returns:

The rate of internal conversion in 1/s.

Return type:

float | npt.NDArray[np.float64]

fluopy.formulas.henderson_hasselbalch_equation(ph: float, pka: float, concentration: float) float[source]

Returns the estimated concentration of the base given the total concentration.

Parameters:
  • ph – The pH as indicator of acidity or basicity.

  • pka – Acid dissociation constant.

  • concentration – Total concentration of the agent in mM.

Returns:

Concentration of the base in mM.

Return type:

float

fluopy.formulas.calculate_pet_rate(reducing_agent: Literal['mea', 'betaME'] = 'mea', concentration: float = 143, k_pet: float = 1, ph: float = 8.0) float[source]

Returns the dSTORM reduction rate for a given reducing agent and its concentration.

Parameters:
  • reducing_agent – One of ‘mea’ (mercaptoethylamine), ‘betaME’ (mercaptoethanol).

  • concentration – Concentration of the reducing agent in mM.

  • k_pet – The rate of photoinduced electron transfer in 1/(s M).

  • ph – The pH as indicator of acidity or basicity.

Returns:

The PeT rate in 1/s.

Return type:

float

fluopy.formulas.calculate_spectral_overlap_integral(donor: numpy.typing.ArrayLike | None = None, acceptor: numpy.typing.ArrayLike | None = None, wavelengths: numpy.typing.ArrayLike | None = None) float[source]

Calculates the spectral overlap integral defined as the integral of the multiplication of the donor emission spectrum normalized to an area of 1, the acceptor molar extinction coefficient as a function of wavelength and the wavelength to the power of 4.

Parameters:
  • donor (1-D array_like) – Contains emission values of the donor - they don’t have to be normalized yet.

  • acceptor (1-D array_like) – Contains the acceptors molar extinction coefficients in 1/(M cm).

  • wavelengths (1-D array_like) – The wavelength values in nm, that correspond to the respective donor and acceptor values.

Returns:

The value of the spectral overlap integral in (nm**4)/(M cm).

Return type:

float

fluopy.formulas.calculate_fret_rate(distance: float = 10, emission_rate: float = 500000000.0, spectral_overlap_integral: float = 1e+16, dipole_orientation_factor: float = 2 / 3, refractive_index: float = 1.33) float[source]

Calculates the Förster resonance energy transfer rate.

Parameters:
  • distance – In nm.

  • emission_rate – In 1/s.

  • spectral_overlap_integral – In (nm**4)/(M cm).

  • dipole_orientation_factor – The dipole orientation factor κ².

  • refractive_index – The refractive index of the medium.

Returns:

fret rate in 1/s.

Return type:

float

fluopy.formulas.calculate_fret_efficiency(fret_rate: float = 100000000.0, fluorescence_lifetime: float = 1e-09) float[source]

Calculates the FRET efficiency.

Parameters:
  • fret_rate – In 1/s.

  • fluorescence_lifetime – The fluorescence lifetime of the donor in absence of the acceptor in s.

Returns:

The FRET efficiency (dimensionless). Between 0 and 1.

Return type:

float

fluopy.formulas.calculate_photon_collection_rate(NA: float = 1.45, n1: float = 1.51) float[source]

Calculates the photon collection rate based on the numerical aperture of the objective.

Parameters:
  • NA – Numerical aperture of the objective.

  • n1 – Refractive index of the medium.

Returns:

The photon collection rate.

Return type:

float