tttrlib
A library for time-tagged time resolved data
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
CorrelatorCurve Class Reference

#include <CorrelatorCurve.h>

Public Member Functions

size_t size ()
 Get the size of the correlation curve.
 
void get_x_axis (double **output, int *n_output)
 Get the x-axis of the correlation.
 
void set_x_axis (std::vector< long long unsigned int > input)
 Set the x-axis to arbitrary bin values.
 
void set_n_bins (int v)
 Set the number of equally spaced correlation channels per block.
 
unsigned int get_n_bins ()
 Get the number of equally spaced correlation channels per block.
 
void set_n_casc (int v)
 Set the number of cascades (blocks) in the correlation curve and update the correlation axis.
 
unsigned int get_n_casc () const
 Get the number of cascades (blocks) in the correlation curve.
 
void get_corr (double **output, int *n_output)
 Get the non-normalized correlation values.
 
void get_corr_normalized (double **output, int *n_output)
 Get the normalized correlation values.
 

Public Attributes

CorrelationCurveSettings settings
 Stores the settings of the correlation curve, i.e., the number of correlation bins.
 

Protected Member Functions

void resize (size_t n)
 Resizes the internal vectors to a specified size.
 
void clear ()
 Clear the correlation values.
 

Protected Attributes

std::vector< unsigned long long > x_axis
 The x-axis (the time axis) of the correlation.
 
std::vector< double > correlation
 The non-normalized correlation.
 
std::vector< double > corr_normalized
 The normalized correlation.
 

Friends

class Correlator
 

Member Function Documentation

◆ clear()

void CorrelatorCurve::clear ( )
inlineprotected

Clear the correlation values.

This method sets all values in the correlation vector to zero, effectively resetting the correlation curve. After calling this method, the correlation curve will be empty.

Example Usage:

// Clear the correlation values
correlatorCurve.clear();

◆ get_corr()

void CorrelatorCurve::get_corr ( double ** output,
int * n_output )

Get the non-normalized correlation values.

Parameters
[out]outputA pointer to an array that will contain the non-normalized correlation values.
[out]n_outputA pointer to an integer that will contain the number of elements in the correlation array.

◆ get_corr_normalized()

void CorrelatorCurve::get_corr_normalized ( double ** output,
int * n_output )

Get the normalized correlation values.

Parameters
[out]outputA pointer to an array that will contain the normalized correlation values.
[out]n_outputA pointer to an integer that will contain the number of elements in the normalized correlation array.

◆ get_n_bins()

unsigned int CorrelatorCurve::get_n_bins ( )
inline

Get the number of equally spaced correlation channels per block.

This method retrieves the number of bins in the correlation curve.

Returns
The number of equally spaced correlation channels per block.

◆ get_n_casc()

unsigned int CorrelatorCurve::get_n_casc ( ) const
inline

Get the number of cascades (blocks) in the correlation curve.

This method returns the current number of cascades (blocks) in the correlation curve.

Returns
The number of cascades.

◆ get_x_axis()

void CorrelatorCurve::get_x_axis ( double ** output,
int * n_output )

Get the x-axis of the correlation.

This method retrieves the x-axis (time axis) of the correlation curve.

Parameters
[out]outputA pointer to an array that will contain the x-axis.
[out]n_outputA pointer to an integer that will contain the number of elements in the x-axis.

◆ resize()

void CorrelatorCurve::resize ( size_t n)
inlineprotected

Resizes the internal vectors to a specified size.

Parameters
nThe new size for the vectors.

◆ set_n_bins()

void CorrelatorCurve::set_n_bins ( int v)
inline

Set the number of equally spaced correlation channels per block.

This method updates the number of bins in the correlation curve. The number of bins is set to the maximum of the specified value and 1. After updating the settings, the x-axis (correlation bins) is also updated accordingly.

Parameters
[in]vThe number of equally spaced correlation channels per block.

◆ set_n_casc()

void CorrelatorCurve::set_n_casc ( int v)
inline

Set the number of cascades (blocks) in the correlation curve and update the correlation axis.

This method sets the number of cascades (blocks) in the correlation curve and ensures it is at least 1. It then updates the correlation axis accordingly.

Parameters
[in]vThe desired number of cascades.

◆ set_x_axis()

void CorrelatorCurve::set_x_axis ( std::vector< long long unsigned int > input)

Set the x-axis to arbitrary bin values.

Attention: Make sure that the correlation method supports arbitrary bin spacing.

Parameters
[in]inputA vector of long long unsigned integers representing the desired bin values.

◆ size()

size_t CorrelatorCurve::size ( )
inline

Get the size of the correlation curve.

This method returns the size of the correlation curve, which corresponds to the number of elements in the x-axis and correlation vectors.

Returns
The size of the correlation curve.

Example Usage:

// Get the size of the correlation curve
size_t curveSize = correlatorCurve.size();

Friends And Related Symbol Documentation

◆ Correlator

friend class Correlator
friend

Member Data Documentation

◆ corr_normalized

std::vector<double> CorrelatorCurve::corr_normalized
protected

The normalized correlation.

◆ correlation

std::vector<double> CorrelatorCurve::correlation
protected

The non-normalized correlation.

◆ settings

CorrelationCurveSettings CorrelatorCurve::settings

Stores the settings of the correlation curve, i.e., the number of correlation bins.

◆ x_axis

std::vector<unsigned long long> CorrelatorCurve::x_axis
protected

The x-axis (the time axis) of the correlation.


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