fluopy.analysis¶
Analysis of a photophysical simulation.
Classes¶
Container of simulation-derived statistical attributes and methods. |
Module Contents¶
- class fluopy.analysis.Analysis(simulation: fluopy.simulation.Simulation)[source]¶
Container of simulation-derived statistical attributes and methods.
- Variables:
simulation (fluopy.simulation.Simulation) – Container for simulation-associated attributes.
frequency_transitions (1-D array_like) – Simulated relative frequencies of each transition.
frequency_states (dict) – Name of fluorophores as keys and their state’s simulated relative frequencies (array) as values.
transition_time_distributions (Collection) – Contains 1-D array_like for each transition (time until the transition).
lifetime_distributions (dict) – Name of fluorophores as keys and collections of their state’s simulated lifetimes (1-D array_like) as values.
mean_transition_times (1-D array_like) – Simulated means of time until transition.
mean_lifetimes (dict) – Name of fluorophores as keys and their state’s simulated lifetime means (array) as values.
state_occupations (dict) – Name of fluorophores as keys and their state’s simulated probability of being occupied at any given point in time (array) as values.
- simulation¶
- frequency_transitions¶
- frequency_states¶
- mean_transition_times¶
- is_absorbing() bool[source]¶
Check whether fluorophores reached Markovian absorbing states.
- Returns:
is_abs – Whether at least one of the fluorophores has reached a Markovian absorbing state.
- Return type:
bool
- get_transition_occurrences() numpy.typing.NDArray[numpy.float64][source]¶
Get the relative frequencies of transitions.
- Returns:
frequency_transitions – Simulated relative frequencies of each transition.
- Return type:
npt.NDArray[np.float64]
- get_state_occurrences() dict[str, numpy.typing.NDArray[numpy.float64]][source]¶
Get the relative frequencies of states.
- Returns:
frequency_states – Name of fluorophores as keys and their state’s simulated relative frequencies (array) as values.
- Return type:
dict[str, npt.NDArray[np.float64]]
- get_lifetimes() tuple[list[numpy.typing.NDArray[numpy.float64]], dict[str, numpy.typing.NDArray[numpy.float64]]][source]¶
Get the lifetime distributions of states and the time until occurrence distributions of transitions. Note: if transition of interest is energy transfer, the time to transition is only collected from the donor’s point of view.
- Returns:
transition_time_distributions (list[npt.NDArray[np.float64]]) – Contains 1-D array_like for each transition (time until the transition).
lifetime_distributions (dict[str, npt.NDArray[np.float64]]) – Name of fluorophores as keys and collections of their state’s simulated lifetimes (1-D array_like) as values.
- infer_stats() tuple[dict[str, numpy.typing.NDArray[numpy.float64]], dict[str, numpy.typing.NDArray[numpy.float64]]][source]¶
Infers statistics of states based on lifetime distributions and frequencies.
- Returns:
mean_lifetimes (dict[str, npt.NDArray[np.float64]]) – Name of fluorophores as keys and their state’s simulated lifetime means (array) as values.
state_occupations (dict[str, npt.NDArray[np.float64]]) – Name of fluorophores as keys and their state’s simulated probability of being occupied at any given point in time (array) as values.
- get_fluorescence_lifetimes(fluorophore: str | None = None) numpy.typing.NDArray[numpy.float64][source]¶
Get the fluorescence lifetime (i.e., S1 lifetime) of the specified fluorophore. Note that this does not consider whether the S1 state decays via photon emission.
- Parameters:
fluorophore – The name of the fluorophore whose fluorescence lifetime is to be returned.
- Returns:
fluorescence_lifetimes – The fluorescence lifetimes of the specified fluorophore.
- Return type:
npt.NDArray[np.float64]
- get_emitting_transition_lifetimes(fluorophore: str | None = None) numpy.typing.NDArray[numpy.float64][source]¶
Get the lifetimes of the emitting transitions (i.e., S1 deexcitation via photon emission) of the specified fluorophore.
- Parameters:
fluorophore – The name of the fluorophore whose fluorescence lifetime is to be returned.
- Returns:
exp_fluorescence_lifetimes – The fluorescence lifetimes (photon emssion) of the specified fluorophore.
- Return type:
npt.NDArray[np.float64]
- plot_frequency_transitions(prediction: fluopy.prediction.Prediction | None = None, diff_dist: bool = True, **kwargs: Any) numpy.typing.NDArray[matplotlib.axes.Axes][source]¶
Plot frequencies of transitions.
- Parameters:
prediction – Container of mathematically derived statistical attributes and methods.
diff_dist – Whether to plot energy transfers distance-specific or not.
kwargs – kwargs for fluopy.figure.universal_figure
- Returns:
Contains matplotlib.axes._subplots.AxesSubplots.
- Return type:
npt.NDArray[mplAxes]
- plot_frequency_states(prediction: fluopy.prediction.Prediction | None = None, **kwargs: Any) numpy.typing.NDArray[matplotlib.axes.Axes][source]¶
Plot frequencies of states.
- Parameters:
prediction – Container of mathematically derived statistical attributes and methods.
kwargs – kwargs to universal_figure
- Returns:
Contains matplotlib.axes._subplots.AxesSubplots.
- Return type:
npt.NDArray[mplAxes]
- plot_mean_transition_times(prediction: fluopy.prediction.Prediction | None = None, diff_dist: bool = True, **kwargs: Any) numpy.typing.NDArray[matplotlib.axes.Axes][source]¶
Plot mean times until transitions occur.
- Parameters:
prediction – Container of mathematically derived statistical attributes and methods.
diff_dist – Whether to plot energy transfers distance-specific or not.
kwargs – kwargs to universal_figure
- Returns:
Contains matplotlib.axes._subplots.AxesSubplots.
- Return type:
npt.NDArray[mplAxes]
- plot_mean_lifetimes(prediction: fluopy.prediction.Prediction | None = None, **kwargs: Any) numpy.typing.NDArray[matplotlib.axes.Axes][source]¶
Plot mean lifetimes of states.
- Parameters:
prediction – Container of mathematically derived statistical attributes and methods.
kwargs – kwargs to universal_figure
- Returns:
Contains matplotlib.axes._subplots.AxesSubplots.
- Return type:
npt.NDArray[mplAxes]
- plot_state_occupations(prediction: fluopy.prediction.Prediction | None = None, **kwargs: Any) numpy.typing.NDArray[matplotlib.axes.Axes][source]¶
Plot state occupation times (relative total time spent in state).
- Parameters:
prediction – Container of mathematically derived statistical attributes and methods.
kwargs – kwargs to universal_figure
- Returns:
Contains matplotlib.axes._subplots.AxesSubplots.
- Return type:
npt.NDArray[mplAxes]
- plot_lifetime_distributions(fluorophore: str, state_identity: int, prediction: fluopy.prediction.Prediction | None = None, **kwargs: Any) numpy.typing.NDArray[matplotlib.axes.Axes][source]¶
Plot lifetime distributions of states.
- Parameters:
fluorophore – The name of the fluorophore whose state’s distribution is to be shown.
state_identity – The identity of the state whose distribution is to be shown.
prediction – Container of mathematically derived statistical attributes and methods.
kwargs – kwargs to universal_figure
- Returns:
Contains matplotlib.axes._subplots.AxesSubplots.
- Return type:
npt.NDArray[mplAxes]
- plot_transition_time_distributions(fluorophore: str, transition_id: int, prediction: fluopy.prediction.Prediction | None = None, **kwargs: Any) numpy.typing.NDArray[matplotlib.axes.Axes][source]¶
Plot distributions of time until transition occurs.
- Parameters:
fluorophore – The name of the fluorophore whose transition’s distribution is to be shown.
transition_id – The identity of the transition whose distribution is to be shown.
prediction – Container of mathematically derived statistical attributes and methods.
kwargs – kwargs to universal_figure
- Returns:
Contains matplotlib.axes._subplots.AxesSubplots.
- Return type:
npt.NDArray[mplAxes]