Berkeley Nuclear Data Software
Public Member Functions | Static Public Member Functions | List of all members
SignalProcessing< T > Class Template Reference

#include <SignalProcessing.h>

Public Member Functions

double calculateTIPS (T *a_signal, unsigned int a_length, int a_kFast, int a_mFast, int a_kSlow, int a_mSlow)
 

Static Public Member Functions

static double * simpleMovingAverage (T *a_signal, unsigned int a_length, unsigned int a_windowSize)
 
static double * iterativeMovingAverage (T *a_signal, unsigned int a_length, unsigned int a_windowSize, unsigned int a_numIter)
 
static double * singlePoleLowPassFilter (T *a_signal, unsigned int a_length, double a_xDecay)
 
static double * singlePoleHighPassFilter (T *a_signal, unsigned int a_length, double a_xDecay)
 
static double * fourStageLowPassFilter (T *a_signal, unsigned int a_length, double a_xDecay)
 
static double * trapezoidalFilter (T *a_signal, unsigned int a_length, int a_k, int a_m)
 

Detailed Description

template<class T>
class SignalProcessing< T >

this class is intended to hold a series of static templated methods for signal processing algorithms designed to work on arrays of data.

Member Function Documentation

◆ calculateTIPS()

template<class T >
double SignalProcessing< T >::calculateTIPS ( T *  a_signal,
unsigned int  a_length,
int  a_kFast,
int  a_mFast,
int  a_kSlow,
int  a_mSlow 
)

this functions applies two fast and slow trapezoidal filters it then calculates the TIPS (max slow/max fast) to provide a PSD metric https://doi.org/10.1109/NSSMIC.2018.8824502

get max values of trap filters

◆ fourStageLowPassFilter()

template<class T >
double * SignalProcessing< T >::fourStageLowPassFilter ( T *  a_signal,
unsigned int  a_length,
double  a_xDecay 
)
static

this function applies a 4 stage low pass filter see equation 19.6 https://www.dspguide.com/ch19/2.htm estimates for the xdecay parameter is given by equation 19.4 or 19.5

first sample set to be same as input

◆ iterativeMovingAverage()

template<class T >
double * SignalProcessing< T >::iterativeMovingAverage ( T *  a_signal,
unsigned int  a_length,
unsigned int  a_windowSize,
unsigned int  a_numIter 
)
static

this function produces a moving average filter.
a given element of the returned array is an average of the last N elements of the given array interpreted as doubles to prevent integer overflows save for the first window size elements which are all the average of the of the first window size elements this applies the smoothing filter n times !!there is likely an optimization of this if it shows up in profiling!!!

this function produces a moving average filter.
a given element of the returned array is an average of the last N elements of the given array interpreted as doubles to prevent integer overflows save for the first window size elements which are all the average of the of the first window size elements this applies the smoothing filter n times

Here is the caller graph for this function:

◆ simpleMovingAverage()

template<class T >
double * SignalProcessing< T >::simpleMovingAverage ( T *  a_signal,
unsigned int  a_length,
unsigned int  a_windowSize 
)
static

this function produces a moving average filter.
a given element of the returned array is an average of the last N elements of the given array interpreted as doubles to prevent integer overflows save for the first window size elements which are all the average of the of the first window size elements

Here is the caller graph for this function:

◆ singlePoleHighPassFilter()

template<class T >
double * SignalProcessing< T >::singlePoleHighPassFilter ( T *  a_signal,
unsigned int  a_length,
double  a_xDecay 
)
static

this function applies a high pass single pole filter see equation 19.3 https://www.dspguide.com/ch19/2.htm estimates for the xdecay parameter is given by equation 19.4 or 19.5

first sample set to be same as input

Here is the caller graph for this function:

◆ singlePoleLowPassFilter()

template<class T >
double * SignalProcessing< T >::singlePoleLowPassFilter ( T *  a_signal,
unsigned int  a_length,
double  a_xDecay 
)
static

this function applies a low pass single pole filter see equation 19.2 https://www.dspguide.com/ch19/2.htm estimates for the xdecay parameter is given by equation 19.4 or 19.5

first sample set to be same as input

◆ trapezoidalFilter()

template<class T >
double * SignalProcessing< T >::trapezoidalFilter ( T *  a_signal,
unsigned int  a_length,
int  a_k,
int  a_m 
)
static

this function applies a trapezoidal filter see second line of table 1 in https://doi.org/10.1016/0168-9002(94)91011-1

Parameters
a_mrise and decay samplesflat top samples

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