Stochastic Loading Module
Variables
signal_processing Namespace Reference

Variables

std::function< std::vector< std::vector< double > >int, double)> hp_butterworth
 
std::function< std::vector< double >std::vector< double >, std::vector< double >, int, int)> impulse_response
 
std::function< Eigen::VectorXd(unsigned int)> hann_window
 

Detailed Description

Signal processing functionality

Variable Documentation

std::function<Eigen::VectorXd(unsigned int)> signal_processing::hann_window
Initial value:
=
[](unsigned int window_length) -> Eigen::VectorXd {
Eigen::VectorXd hann(window_length);
double number_of_points = static_cast<double>(window_length - 1);
for (unsigned int i = 0; i < hann.size(); ++i) {
hann[i] = 0.5 * (1.0 - std::cos(2.0 * M_PI * i / number_of_points));
}
return hann;
}

Function that calculated the Hann window for the input window length

Parameters
[in]window_lengthDesired length of window
Returns
Vector filled with Hann window function evaluations based on input window length

Definition at line 22 of file window.h.

std::function<std::vector<std::vector<double> >int, double)> signal_processing::hp_butterworth

Function for calculating the coefficients of the highpass Butterworth filter

Parameters
[in]filter_orderOrder of the Butterworth filter
[in]cuttoff_freqNormalized cutoff frequency
Returns
Returns a vector containing two vectors where the first vector contains and numerator coefficients and the second vector contains the denominator coefficients.

Definition at line 23 of file filter.h.

std::function<std::vector<double>std::vector<double>, std::vector<double>, int, int)> signal_processing::impulse_response

Function that calculates the impulse response of a filter defined by the input numerator and denominator coefficients for the input number of samples

Parameters
[in]numerator_coeffsNumerator coefficients for filter
[in]denominator_coeffsDenominator coefficients for filter
[in]orderOrder of the filter
[in]num_samplesNumber of samples desired
Returns
Vector containing impulse response for requested number of samples

Definition at line 76 of file filter.h.