pyfli.simulator.combined.simulator_engine#
Drive the main FLI parameter sampler and TCSPC simulation engine.
This module belongs to pyfli.simulator.combined and is part of PyFLI synthetic
FLI/FLIM data generation, hardware noise modeling, calibration, and validation tools.
Public API includes classes FLIEngine.
Shared IRF/timing setup, n_cycles range validation, and TCSPC photon-binning logic
live in pyfli.simulator.sim_engine_common.
Classes
|
Run the fliengine routine. |
- class FLIEngine(irf_full, tau2=(1, 0.5), efficiency=(5, 5), A1_fraction=(5, 5), photo_count=(1.0, 1.0), mono_fraction=0.2, bit=8, n_cycles=800_000, dcr=0.05, laser_feq=80, pileup_mode='wrap', seed=None, **kwargs)[source]#
Bases:
BaseFLIEngineRun the fliengine routine. analytical decays, and simulates TCSPC counts from a shared IRF and configuration.
- Parameters:
irf_full (
np.ndarray) – Full instrument response function sampled over the decay window.tau2 (
tuple[int,float]) – Long lifetime component.efficiency (
tuple[int,]) – FRET transfer efficiency used to derive simulated lifetime components.A1_fraction (
tuple[int,]) – Amplitude fraction assigned to the first exponential component.photo_count (
tuple[float,int]) – Expected photon count used to scale the simulated decay.mono_fraction (
float) – Fraction of pixels or events assigned to the mono-exponential component.bit (
int) – Bit depth or quantization setting for simulated detector output.n_cycles (
int | tuple[int,int]) – Number of excitation cycles used when constructing the simulated decay. A bare int is the upper bound (lower bound fixed at 1000); a(low, high)tuple sets both bounds, and both must be >= 1000. The per-call cycle count is drawn from a Beta distribution (shaped byphoto_count) over that range.dcr (
float) – Detector dark-count rate used by the noise model.laser_feq (
int) – Laser repetition frequency used by the simulation.pileup_mode (
str) – ‘wrap’ (default) folds photons back via modulo; ‘truncate’ drops them.seed (
int | None) – Seed for reproducible random sampling.**kwargs (
Any) – Additional keyword arguments forwarded to the underlying implementation.