
12
SIMULATION AND TESTING: DEMO MODE
12
Simulation and Testing: Demo Mode
For simulation and testing purposes, a demo mode is included. It is automatically accessed
by the quTAU GUI when no suitable device is found. For countrate simulation, the
simulation happens only in the GUI software, but for lifetime and HBT measurements,
the demo mode is also included in the DLL to test the respective analyzing functions of
the DLL.
12.1
quTAU GUI Simulation
You can find an option to simulate in the countrate, lifetime, and HBT panels. Events are
generated to fit the specified model. Please note that it is not possible (yet) to generate
demo timestamps for Lifetime and HBT measurements simultaneously; if one demo is
started, the other is paused. Nevertheless, it is of course possible to run both panels
simultaneously using a real device.
12.2
DLL Usage
For simulation and testing, events can be generated by the software as if they were pro-
duced by real signals. There are several options:
generate timestamps:
Using the function
TDC generateTimestamps
the buffers for all
histograms (start-stop, lifetime, HBT) are fed the requested number of timestamps
once.
generate demo:
For the histogram types lifetime and HBT separate simulation func-
tions exist. These generate time differences with the specified characteristics (expo-
nential decay, anti bunching, etc.). In contrast to generate timestamps above, these
functions enable or disable a continuous stream of simulated data.
Usage examples are also available in the
src
folder as
example[0,2,4].c
.
Functions relevant to Data Simulation
tdcbase.h:
int
TDC generateTimestamps
(TDC SimType type, double
∗
par, Int32
count)
tdchbt.h:
int
TDC generateHbtDemo
(HBT FctType fctType, const double
∗
params,
double noiseLv)
tdclifetime.h:
int
TDC generateLftDemo
(LFT FctType fctType, const double
∗
params,
double noiseLv)
quTAU/quPSI Manual V4.0 Page 43