Performs the convolution operation specified by m_operation on the input data. Operations include direct convolution, cross-correlation, matched filtering, deconvolution, and auto-correlation. These operations are fundamental for signal processing tasks such as filtering, pattern matching, and system identification. Supports both in-place and out-of-place transformations.
77 {
80 auto impulse_response = get_parameter_or<std::vector<double>>("impulse_response", std::vector<double> { 1.0 });
81
84 }
86 }
87
89 auto template_signal = get_parameter_or<std::vector<double>>("template_signal", std::vector<double> { 1.0 });
90 auto normalize = get_parameter_or<bool>(
"normalize",
true);
91
94 }
96 }
97
99 auto reference_signal = get_parameter_or<std::vector<double>>("reference_signal", std::vector<double> { 1.0 });
100
103 }
105 }
106
108 auto impulse_response = get_parameter_or<std::vector<double>>("impulse_response", std::vector<double> { 1.0 });
109 auto regularization = get_parameter_or<double>("regularization", 1e-6);
110
113 }
115 }
116
118 auto normalize = get_parameter_or<bool>(
"normalize",
true);
119
122 }
124 }
125
126 default:
128 }
129 }
DataType transform_auto_correlate_fft(DataType &input, bool normalize=true)
Auto-correlation using FFT (IN-PLACE)
@ DECONVOLUTION
Deconvolution.
@ DIRECT_CONVOLUTION
Standard convolution.
@ AUTO_CORRELATION
Auto-correlation.
@ CROSS_CORRELATION
Cross-correlation.
@ MATCHED_FILTER
Matched filtering.
DataType transform_matched_filter(DataType &input, const std::vector< double > &reference_signal)
Matched filter using cross-correlation for signal detection (IN-PLACE)
DataType transform_deconvolve(DataType &input, const std::vector< double > &impulse_to_remove, double regularization=1e-6)
Deconvolution using frequency domain division (IN-PLACE) Useful for removing known impulse responses.
DataType transform_cross_correlate(DataType &input, const std::vector< double > &template_signal, bool normalize=true)
Cross-correlation using FFT (convolution with time-reversed impulse) (IN-PLACE)
DataType transform_convolve(DataType &input, const std::vector< double > &impulse_response)
Convolution transformation using existing infrastructure with C++20 ranges (IN-PLACE)
void normalize(std::vector< double > &data, double target_peak)
Normalize single-channel data to specified peak level (in-place)