pyfli.simulator.main_common#
Shared engine-wrapping pipelines for the continuous (ICCD-style) and discrete (TCSPC-style) simulator pairs.
combined/main_factory.py (MacroSimulator,
TCSPCSimulator, wrapping
FLIEngine) and
separate/main_factory_gen.py (ContinuousSimulator,
PhotonCountSimulator, wrapping
FLIModelSimulator) implement the identical
noise/scaling pipeline; they differ only in which engine class they wrap, the names of
a few methods on that engine, and whether the “mono” branch trims the returned maps
dict. Subclasses declare those differences as class attributes; this module owns the
actual pipeline math so it is defined exactly once.
Functions
|
Build the parameter-maps dict, optionally trimmed for mono pixels. |
Classes
|
Shared |
|
Shared |
- class BaseContinuousSimulator(irf_data, sensor_type='continuous', **cfg)[source]#
Bases:
objectShared
__call__pipeline for MacroSimulator/ContinuousSimulator: samples lifetime parameters, scales an IRF-convolved analytical decay to a Beta-sampled peak intensity, and applies the jitter/QE/DCR/read-noise/Poisson/quantization pipeline.Subclasses set the following class attributes:
- engine_clstype
The engine class to wrap (
FLIEngine/FLIModelSimulator).- sample_params_namestr
Name of the engine method that samples lifetime parameters.
- analytical_decay_namestr
Name of the engine method that returns the clean analytical decay.
- mono_only_mapsbool
Whether
p["mono"]trims the returned maps dict down to{tau_map, photon_count_map, mono_map}(True, as inContinuousSimulator) or the full map set is always returned regardless of mono status (False, as inMacroSimulator).
- class BaseDiscreteSimulator(irf_data, sensor_type='discrete', **cfg)[source]#
Bases:
objectShared
__call__pipeline for TCSPCSimulator/PhotonCountSimulator: samples lifetime parameters, runs a TCSPC photon-by-photon histogram, and applies the jitter/DCR/quantization pipeline.Subclasses set the following class attributes:
- engine_clstype
The engine class to wrap (
FLIEngine/FLIModelSimulator).- sample_params_namestr
Name of the engine method that samples lifetime parameters.
- analytical_decay_namestr
Name of the engine method that returns the clean analytical decay.
- simulate_tcspc_namestr
Name of the engine method that runs the TCSPC photon histogram.
- mono_only_mapsbool
As in
BaseContinuousSimulator.