fluopy.fluorophores

Define and work with fluorophores.

Classes

Fluorophore

Contains attributes of a fluorophore.

FluorophoreSystem

Container for attributes of multiple, interrelated fluorophores.

Module Contents

class fluopy.fluorophores.Fluorophore[source]

Contains attributes of a fluorophore.

Variables:
  • identity (int) – The id of the fluorophore. Not None if fluorophore is part of a FluorophoreSystem.

  • name (str) – Name of the fluorophore.

  • position (Collection[float]) – The position of the fluorophore in space in nm.

  • constants (FluorophoreData | None) – If None an instance of FluorophoreData with the same name is inserted if available in fluopy.fluo_data.

identity: int = None
name: str
position: collections.abc.Collection[float]
constants: fluopy.fluo_data.FluorophoreData | None = None
__post_init__() None[source]
class fluopy.fluorophores.FluorophoreSystem[source]

Container for attributes of multiple, interrelated fluorophores.

Variables:
  • fluorophores (Sequence[Fluorophore]) – Contains all given fluorophores of type Fluorophore.

  • multi_type (bool) – Whether there are multiple types of fluorophores in the system.

  • distances (dict[tuple[int, int], np.float64]) – Contains tuples of 2 fluorophore ids as keys and their distance as values. The distances are given in nm and are rounded to 3 decimals.

  • count (int) – The total number of fluorophores given.

fluorophores: collections.abc.Sequence[Fluorophore]
multi_type: bool
distances: dict[tuple[int, int], numpy.float64]
count: int
__post_init__() None[source]
load_transitions(summarize: bool = False, irradiance: float = 2, wavelength: float = 600, bleaching: bool = False, energy_transfer: bool = True, dstorm: bool = True, energy_transfer_parameters: dict[Literal['dipole_orientation_factor', 'refractive_index', 'overwrite', 'exclude', 'include'], Any] | None = None, dstorm_parameters: dict[str, Any] | None = None) dict[str, list[fluopy.transitions.Transition]][source]

Derives transitions based on fluorophore and the experimental conditions to be mimicked.

Parameters:
  • summarize – Whether to summarize some transitions into fewer.

  • irradiance – Irradiance in kW/cm².

  • wavelength – Wavelength in nm.

  • bleaching – Whether to incorporate bleaching as a possible transition.

  • energy_transfer – Whether to incorporate energy transfers as possible transitions.

  • dstorm – Whether to incorporate dstorm photoswitching as possible transitions.

  • energy_transfer_parameters

    May contain the following keys: dipole_orientation_factor, refractive_index, overwrite, exclude, include. Only used if energy_transfer is True. - overwrite : dict

    Contains the type of acceptor state as key and a list with a factor for the rate as well as an efficiency (of not recycling acceptor state) as value.

    • excludelist

      Contains the type of acceptor state (lowercase) to be excluded.

    • includedict

      Contains the type of acceptor state as key and a list of tuples as values. The tuples contain the transition type and an efficiency. If the summed efficiencies is e.g., 0.5, all other energy transfers affecting the acceptor state are multiplied by 1-0.5.

  • dstorm_parameters – May contain the following keys: reducing_agent, concentration, k_pet, ph. Only used if dstorm is True.

Returns:

transitions – Contains lists of transitions of type Transition as values and fluorophores or fluorophore-combinations (D: <donor>, A: <acceptor>, dist: <distance>) as keys.

Return type:

dict[str, list[Transition]]

plot(quadratic: bool = True, **kwargs) numpy.typing.NDArray[matplotlib.axes.Axes][source]

Plot the positions of fluorophores.

Parameters:
  • quadratic – Whether to display the plot with same x and y axis scaling.

  • kwargs – fluopy.figure.universal_figure arguments

Returns:

axes – Contains matplotlib.axes._subplots.AxesSubplots.

Return type:

npt.NDArray[matplotlib.axes.Axes]