pyfli.simulator.noise_models#

Apply Poisson, dark-count, read-noise, jitter, and pile-up models to simulated decays.

This module belongs to pyfli.simulator and is part of PyFLI synthetic FLI/FLIM data generation, hardware noise modeling, calibration, and validation tools. Public API includes classes NoiseEngine.

Classes

NoiseEngine()

Apply detector noise transformations to clean simulated decays.

class NoiseEngine[source]#

Bases: object

Apply detector noise transformations to clean simulated decays. Static methods model Poisson counting, dark counts, read noise, temporal jitter, and simple TCSPC pile-up filtering.

static apply_poisson(clean_signal)[source]#

Apply poisson.

Parameters:

clean_signal (np.ndarray) – Noise-free simulated signal before detector noise is applied.

Returns:

Object produced by apply poisson.

Return type:

Any

static apply_dcr(decay, dcr_level=0.5)[source]#

Simulates Dark Count Rate (thermal noise). dcr_level: average dark photons per bin per measurement.

Parameters:
Return type:

Any

static apply_read_noise(decay, sigma_read=1.5)[source]#

Simulates electronic read noise (Gaussian). Common in ICCD sensors during CCD readout.

Parameters:
Return type:

Any

static apply_jitter(decay, max_shift=2)[source]#

Apply jitter.

Parameters:
  • decay (np.ndarray) – Time-resolved decay signal or decay cube.

  • max_shift (int) – Maximum random temporal jitter shift in bins.

Returns:

Decay array after timing jitter has been applied.

Return type:

np.ndarray

static tcspc_pileup_filter(arrival_times, t_rep, mode='wrap')[source]#

Run the TCSPC pileup filter routine.

Parameters:
  • arrival_times (np.ndarray) – Photon arrival times passed to the TCSPC pile-up filter.

  • t_rep (float) – Laser repetition period used for TCSPC pile-up filtering.

  • mode (str) – ‘wrap’ (default) folds photons back via modulo; ‘truncate’ drops them.

Returns:

Object produced by TCSPC pileup filter.

Return type:

Any