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

Photon Counting Histogram module for Real time calculation on Teensy 4.1 microcontrollers. More...

#include <histogram.hpp>

Public Member Functions

constexpr unsigned int size () __attribute__((always_inline))
 Returns the total number of buns, including the overflow bin. More...
 
template<typename DataType >
void push_back (DataType datum)
 Receives a single datum and processes it to into the Histogram. More...
 
void output () __attribute__((always_inline))
 Sends the complete Histogram to the Serial output. More...
 

Public Attributes

BinType Histogram [Bins+1] = {0}
 Histogram function array. More...
 

Private Attributes

unsigned int Index
 Index used by the pushback function. More...
 

Detailed Description

template<typename BinType, unsigned int Bins>
class PCHistogram< BinType, Bins >

Photon Counting Histogram module for Real time calculation on Teensy 4.1 microcontrollers.

Describes a real time histogram function that is updated point by point. The Bin index starts from zero. The histogram's lasrt bin, which is Bins + 1th bin is the overflow bin and includes all points above the maximum bin size. The histogram bin is left centred, i.e., the bin contains all numbers lower or equal to the Bin value.

* [Bin 0][Bin 1][Bin 2][Bin 3][Bin 4]...[Bin Max][•|Bin Overflow|•]
* 

Member Function Documentation

◆ output()

template<typename BinType , unsigned int Bins>
void PCHistogram< BinType, Bins >::output ( )
inline

Sends the complete Histogram to the Serial output.

◆ push_back()

template<typename BinType , unsigned int Bins>
template<typename DataType >
void PCHistogram< BinType, Bins >::push_back ( DataType  datum)
inline

Receives a single datum and processes it to into the Histogram.

◆ size()

template<typename BinType , unsigned int Bins>
constexpr unsigned int PCHistogram< BinType, Bins >::size ( )
inlineconstexpr

Returns the total number of buns, including the overflow bin.

Member Data Documentation

◆ Histogram

template<typename BinType , unsigned int Bins>
BinType PCHistogram< BinType, Bins >::Histogram[Bins+1] = {0}

Histogram function array.

◆ Index

template<typename BinType , unsigned int Bins>
unsigned int PCHistogram< BinType, Bins >::Index
private

Index used by the pushback function.


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