DIY Auto-Correlator 1.0
Auto-Correlator Card implementation using Teensy 4.x microcontrollers.
Public Member Functions | Public Attributes | Private Member Functions | List of all members
InterArrivalTime< CounterType, CPUTickType > Class Template Reference

#include <interarrival.hpp>

Public Member Functions

constexpr InterArrivalTime (const CounterType *cntr_location)
 Constructor that accepts the counter location, that it frequently samples. It only accepts unsigned int types. More...
 
void measure () __attribute__((flatten))
 Measures the difference between two observable counts. If the mean is closer to 1, the pulse inter-arrival time will be implemented later using the CPU cycle count. More...
 
void output () __attribute__((always_inline))
 Outputs the calculated statistics as a binary struct. More...
 

Public Attributes

CounterType * Cntr
 Saves the address of the counter location. More...
 
CounterType CountDiff = 0
 The difference between the arrival time of last two photons. More...
 
CounterType LastCntr = 0
 Last Counter value recorded. More...
 
CounterType Now = 0
 Current Counter value storage. More...
 
MonitorChannel< true > Mean
 Mean Inter-arrival time. More...
 

Private Member Functions

CounterType get_counter () __attribute__((always_inline))
 

Constructor & Destructor Documentation

◆ InterArrivalTime()

template<typename CounterType , typename CPUTickType >
constexpr InterArrivalTime< CounterType, CPUTickType >::InterArrivalTime ( const CounterType *  cntr_location)
inlineconstexpr

Constructor that accepts the counter location, that it frequently samples. It only accepts unsigned int types.

Member Function Documentation

◆ get_counter()

template<typename CounterType , typename CPUTickType >
CounterType InterArrivalTime< CounterType, CPUTickType >::get_counter ( )
inlineprivate

◆ measure()

template<typename CounterType , typename CPUTickType >
void InterArrivalTime< CounterType, CPUTickType >::measure ( )
inline

Measures the difference between two observable counts. If the mean is closer to 1, the pulse inter-arrival time will be implemented later using the CPU cycle count.

◆ output()

template<typename CounterType , typename CPUTickType >
void InterArrivalTime< CounterType, CPUTickType >::output ( )
inline

Outputs the calculated statistics as a binary struct.

Member Data Documentation

◆ Cntr

template<typename CounterType , typename CPUTickType >
CounterType* InterArrivalTime< CounterType, CPUTickType >::Cntr

Saves the address of the counter location.

◆ CountDiff

template<typename CounterType , typename CPUTickType >
CounterType InterArrivalTime< CounterType, CPUTickType >::CountDiff = 0

The difference between the arrival time of last two photons.

◆ LastCntr

template<typename CounterType , typename CPUTickType >
CounterType InterArrivalTime< CounterType, CPUTickType >::LastCntr = 0

Last Counter value recorded.

◆ Mean

template<typename CounterType , typename CPUTickType >
MonitorChannel<true> InterArrivalTime< CounterType, CPUTickType >::Mean

Mean Inter-arrival time.

◆ Now

template<typename CounterType , typename CPUTickType >
CounterType InterArrivalTime< CounterType, CPUTickType >::Now = 0

Current Counter value storage.


The documentation for this class was generated from the following file: