TDCBase
tdchbt.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Project: TDC Control Library
4  *
5  * Filename: tdchbt.h
6  *
7  * Purpose: g(2) Functions and Fitting
8  *
9  * Author: NHands GmbH & Co KG
10  */
11 /*****************************************************************************/
27 /*****************************************************************************/
28 /* $Id: tdchbt.h,v 1.4 2020/08/24 16:17:34 trurl Exp $ */
29 
30 #ifndef __TDCHBT_H
31 #define __TDCHBT_H
32 
33 #include "tdcdecl.h"
34 
36 #define HBT_PARAM_SIZE 5
37 
46 typedef enum {
83 } HBT_FctType;
84 
85 
103 typedef struct {
108  double values[1];
110 
111 
125 TDC_API int TDC_CC TDC_enableHbt( Bln32 enable );
126 
127 
139 TDC_API int TDC_CC TDC_setHbtParams( Int32 binWidth,
140  Int32 binCount );
141 
142 
150 TDC_API int TDC_CC TDC_getHbtParams( Int32 * binWidth,
151  Int32 * binCount );
152 
153 
162 TDC_API int TDC_CC TDC_setHbtDetectorParams( double jitter );
163 
164 
172 TDC_API int TDC_CC TDC_getHbtDetectorParams( double * jitter );
173 
174 
184 TDC_API int TDC_CC TDC_setHbtInput( Int32 channel1,
185  Int32 channel2 );
186 
187 
196 TDC_API int TDC_CC TDC_getHbtInput( Int32 * channel1,
197  Int32 * channel2 );
198 
199 
206 
207 
221 TDC_API int TDC_CC TDC_getHbtEventCount( Int64 * totalCount,
222  Int64 * lastCount,
223  double * lastRate );
224 
225 
234 TDC_API int TDC_CC TDC_getHbtIntegrationTime( double * intTime );
235 
236 
250  TDC_HbtFunction * fct );
251 
252 
263 
264 
282 TDC_API int TDC_CC TDC_fitHbtG2( const TDC_HbtFunction * fct,
283  HBT_FctType fitType,
284  const double * startParams,
285  double * fitParams,
286  Int32 * iterations );
287 
288 
298 TDC_API const double * TDC_CC TDC_getHbtFitStartParams( HBT_FctType fctType,
299  double * params );
300 
301 
313  const double * params,
314  TDC_HbtFunction * fct );
315 
316 
330  const double * params,
331  double noiseLv );
332 
333 
344 
345 
353 
354 
371  Int32 * capacity,
372  Int32 * size,
373  Int32 * binWidth,
374  Int32 * iOffset,
375  double * values,
376  Int32 bufSize );
377 
378 #endif
Coherent light.
Definition: tdchbt.h:49
#define TDC_CC
Calling convention.
Definition: tdcdecl.h:34
TDC_API int TDC_CC TDC_setHbtInput(Int32 channel1, Int32 channel2)
Set TDC Channels for Input.
Single photon with detector jitter considered and offset fit The function requires 2 parameters: t1...
Definition: tdchbt.h:77
TDC_API int TDC_CC TDC_setHbtParams(Int32 binWidth, Int32 binCount)
Set Correlation Function Parameters.
TDC_API TDC_HbtFunction *TDC_CC TDC_createHbtFunction(void)
Create Function Description.
TDC_API int TDC_CC TDC_getHbtIntegrationTime(double *intTime)
Retrieve Integration Time.
Thermal with detector jitter considered and offset fit The function requires 4 parameters: A...
Definition: tdchbt.h:75
TDC_API int TDC_CC TDC_getHbtInput(Int32 *channel1, Int32 *channel2)
Get TDC Channels for Input.
__int64 Int64
64 bit integer for MSVC
Definition: tdcdecl.h:55
TDC_API int TDC_CC TDC_getHbtEventCount(Int64 *totalCount, Int64 *lastCount, double *lastRate)
Retrieve Event Count and Rate.
TDC_API void TDC_CC TDC_analyseHbtFunction(const TDC_HbtFunction *fct, Int32 *capacity, Int32 *size, Int32 *binWidth, Int32 *iOffset, double *values, Int32 bufSize)
Analyse Function Description.
HBT_FctType
Type of a model function.
Definition: tdchbt.h:46
Int32 size
Number of valid items in values.
Definition: tdchbt.h:105
TDC_API int TDC_CC TDC_generateHbtDemo(HBT_FctType fctType, const double *params, double noiseLv)
Generate Demo Data.
TDC_API int TDC_CC TDC_getHbtDetectorParams(double *jitter)
Get Detector Parameters.
Thermal with addtitional fit of detector offset The function requires 4 parameters: A...
Definition: tdchbt.h:67
TDC_API const double *TDC_CC TDC_getHbtFitStartParams(HBT_FctType fctType, double *params)
Get Recommended Fit Start Parameters.
Int32 capacity
Array size of values.
Definition: tdchbt.h:104
Int32 binWidth
Size of a t step in TDC time units.
Definition: tdchbt.h:106
TDC_API int TDC_CC TDC_resetHbtCorrelations()
Reset Correlation Functions.
TDC_API int TDC_CC TDC_setHbtDetectorParams(double jitter)
Set Detector Parameters.
TDC_API void TDC_CC TDC_releaseHbtFunction(TDC_HbtFunction *fct)
Release Function Description.
__int32 Bln32
integer used as boolean
Definition: tdcdecl.h:57
TDC_API int TDC_CC TDC_getHbtCorrelations(Bln32 forward, TDC_HbtFunction *fct)
Retrieve Correlation Function.
Single photon light source.
Definition: tdchbt.h:53
Three level system with detector jitter.
Definition: tdchbt.h:64
Int32 indexOffset
Index for element of values that represents t=0.
Definition: tdchbt.h:107
__int32 Int32
32 bit integer for MSVC
Definition: tdcdecl.h:54
TDC_API int TDC_CC TDC_calcHbtModelFct(HBT_FctType fctType, const double *params, TDC_HbtFunction *fct)
Calculate Model Function.
TDC_API int TDC_CC TDC_calcHbtG2(TDC_HbtFunction *fct)
Calculate g(2) Function.
Single photon with addtitional fit of detector offset The function requires 2 parameters: t1...
Definition: tdchbt.h:69
#define TDC_API
External DLL interface.
Definition: tdcdecl.h:38
Thermal with detector jitter considered.
Definition: tdchbt.h:59
Three level system with addtitional fit of detector offset The function requires 5 parameters: pf2...
Definition: tdchbt.h:72
Three level system with detector jitter considered and offset fit The function requires 5 parameters:...
Definition: tdchbt.h:80
Correlation Function or g(2) Function.
Definition: tdchbt.h:103
No function, invalid.
Definition: tdchbt.h:47
TDC_API int TDC_CC TDC_getHbtParams(Int32 *binWidth, Int32 *binCount)
Get Correlation Function Parameters.
Thermal light source.
Definition: tdchbt.h:51
Single photon with detector jitter considered.
Definition: tdchbt.h:61
TDC_API int TDC_CC TDC_enableHbt(Bln32 enable)
Enable HBT Calculations.
TDC_API int TDC_CC TDC_fitHbtG2(const TDC_HbtFunction *fct, HBT_FctType fitType, const double *startParams, double *fitParams, Int32 *iterations)
Fit g(2) Function.
Three level system light source.
Definition: tdchbt.h:56
Technical declarations for the DLL interface and basic type defs.