fluopy.formulas =============== .. py:module:: fluopy.formulas .. autoapi-nested-parse:: Mathematical formulas for optical and spectral properties. Functions --------- .. autoapisummary:: fluopy.formulas.convert_wavenumber_wavelength_frequency fluopy.formulas.calculate_photon_flux fluopy.formulas.calculate_excitation_rate fluopy.formulas.calculate_emission_rate fluopy.formulas.calculate_internal_conversion_rate fluopy.formulas.henderson_hasselbalch_equation fluopy.formulas.calculate_pet_rate fluopy.formulas.calculate_spectral_overlap_integral fluopy.formulas.calculate_fret_rate fluopy.formulas.calculate_fret_efficiency fluopy.formulas.calculate_photon_collection_rate Module Contents --------------- .. py:function:: 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]] Convert either wavenumber, wavelength or frequency into the other two. :param wavenumber: In 1/cm. :param wavelength: In nm. :param frequency: In Hz. :returns: (wavenumber in 1/cm, wavelength in nm, frequency in Hz) :rtype: tuple[npt.NDArray[np.float64]] .. py:function:: calculate_photon_flux(irradiance: float | numpy.typing.ArrayLike = 2, frequency: float | numpy.typing.ArrayLike = 450000000000000.0) -> numpy.typing.NDArray[numpy.float64] Calculates the photon flux based on the irradiance and the frequency of the light. :param irradiance: The irradiance in kW/cm². :param frequency: The frequency in Hz. :returns: The photon flux in 1/(m² s). :rtype: npt.NDArray[np.float64] .. py:function:: 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] Returns the excitation rate for a given irradiance and an extinction coefficient or an absorption cross section. :param photon_flux: The photon flux in 1/(m² s). :param extinction_coefficient: Extinction coefficient of fluorophore at wavelength in 1/(cm M). :param 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. :rtype: float | npt.NDArray[np.float64] .. py:function:: 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] Returns the rate of fluorescent emission based on the quantum yield and the fluorescence lifetime. :param quantum_yield: Number between 0 and 1. :param fluorescence_lifetime: The fluorescence lifetime in s. :returns: The rate of emission in 1/s. :rtype: float | npt.NDArray[np.float64] .. py:function:: 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] Calculates the rate of internal conversion from the first excited state to the vibrationally excited but electronic ground state. :param quantum_yield: Number between 0 and 1. :param emission_rate: The rate of emission in 1/s. :param other_outgoing_rates_args: Rates of all other transitions (except fluorescence emission) that leave the first excited state in 1/s. :param 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. :rtype: float | npt.NDArray[np.float64] .. py:function:: henderson_hasselbalch_equation(ph: float, pka: float, concentration: float) -> float Returns the estimated concentration of the base given the total concentration. :param ph: The pH as indicator of acidity or basicity. :param pka: Acid dissociation constant. :param concentration: Total concentration of the agent in mM. :returns: Concentration of the base in mM. :rtype: float .. py:function:: calculate_pet_rate(reducing_agent: Literal['mea', 'betaME'] = 'mea', concentration: float = 143, k_pet: float = 1, ph: float = 8.0) -> float Returns the dSTORM reduction rate for a given reducing agent and its concentration. :param reducing_agent: One of 'mea' (mercaptoethylamine), 'betaME' (mercaptoethanol). :param concentration: Concentration of the reducing agent in mM. :param k_pet: The rate of photoinduced electron transfer in 1/(s M). :param ph: The pH as indicator of acidity or basicity. :returns: The PeT rate in 1/s. :rtype: float .. py:function:: calculate_spectral_overlap_integral(donor: numpy.typing.ArrayLike | None = None, acceptor: numpy.typing.ArrayLike | None = None, wavelengths: numpy.typing.ArrayLike | None = None) -> float 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. :param donor: Contains emission values of the donor - they don't have to be normalized yet. :type donor: 1-D array_like :param acceptor: Contains the acceptors molar extinction coefficients in 1/(M cm). :type acceptor: 1-D array_like :param wavelengths: The wavelength values in nm, that correspond to the respective donor and acceptor values. :type wavelengths: 1-D array_like :returns: The value of the spectral overlap integral in (nm**4)/(M cm). :rtype: float .. py:function:: 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 Calculates the Förster resonance energy transfer rate. :param distance: In nm. :param emission_rate: In 1/s. :param spectral_overlap_integral: In (nm**4)/(M cm). :param dipole_orientation_factor: The dipole orientation factor κ². :param refractive_index: The refractive index of the medium. :returns: fret rate in 1/s. :rtype: float .. py:function:: calculate_fret_efficiency(fret_rate: float = 100000000.0, fluorescence_lifetime: float = 1e-09) -> float Calculates the FRET efficiency. :param fret_rate: In 1/s. :param fluorescence_lifetime: The fluorescence lifetime of the donor in absence of the acceptor in s. :returns: The FRET efficiency (dimensionless). Between 0 and 1. :rtype: float .. py:function:: calculate_photon_collection_rate(NA: float = 1.45, n1: float = 1.51) -> float Calculates the photon collection rate based on the numerical aperture of the objective. :param NA: Numerical aperture of the objective. :param n1: Refractive index of the medium. :returns: The photon collection rate. :rtype: float