4.1.1.3.1.1. lib.simulation.setup#

Module that provides some base-classes to set-up an experiment. Main components are the instrument and the sample.

4.1.1.3.1.1.1. Module Contents#

4.1.1.3.1.1.1.1. Classes#

Setup

Class for the Hardware components: Instrument and Sample

Instrument

SampleGenerator

Sample

Trace

Class to represent trace data, e.g. photon counts, bleaching indices etc.

4.1.1.3.1.1.1.2. API#

class lib.simulation.setup.Setup(instrument=None, sample=None)#

Class for the Hardware components: Instrument and Sample

Initialization

get_trace(pattern, mode='real')#

Trigger a response of the setup to a pattern object. :return: Trace object with photon counts.

get_model()#

Numerical expression for the cumulative poissonian mean lambda (all molecules’ emission combined, including background) :return: function f(X,PSFp,**kwargs)

signal_model()#

Get the signal of the molecules :return: callable of signal model

bgr_model()#

Get the background model. :return: Callable of bgr model

class lib.simulation.setup.Instrument(param_dict={})#

Initialization

emissionPSF(X, pattern, **kwargs)#
backgroundPSF(pattern, **kwargs)#
detectionPSF(pattern, **kwargs)#
effPSF()#

Convolve emission and detection.

effBgr()#

Convolve background and detection.

class lib.simulation.setup.SampleGenerator(param_dict={})#

Initialization

generate_sample()#
get_rand_positions(int_range=20)#
class lib.simulation.setup.Sample(config)#

Initialization

clone()#
get_photons(pattern, signal, bgr, dwell_time, mean=False, cumulative=True)#

Method in order to retrieve the photons from the sample. :param pattern: pattern object :param signal: eff PSF callable :param bgr: effBgr callable :param mean: option to disable poisson noise (True) :param cumulative: option to receive a cumulated signal of all emitters

_get_sig_photons(pattern, model, dwell_time, mean=False, blinking=False)#

Method to retrieve signal from molecules. :return: array of photons, shape=(#number of molecules, #number of measurement sites)

_get_bgr_photons(pattern, model, mean=False)#
is_bleached()#
add_blinking(phot_vec, dwell_time)#
class lib.simulation.setup.Trace#

Class to represent trace data, e.g. photon counts, bleaching indices etc.

Initialization

Initialization :param config: configuration object

construct_trace(sig_photons, bgr_photons)#

Method in order to retrieve the photons from the sample. :param sig_photons: signal photons, shape= (K) :param bgr_photons: shapem = (K) :return: Trace Object