lasp/cpp_src/dsp/lasp_freqsmooth.h
J.A. de Jong - Redu-Sone B.V., ASCEE V.O.F ab080910fc
Some checks failed
Building, testing and releasing LASP if it has a tag / Release-Ubuntu (push) Blocked by required conditions
Building, testing and releasing LASP if it has a tag / Build-Test-Ubuntu (push) Has been cancelled
Made power correction in smoothing algorithm optional. Window decreases in size symmetrically around the edged of the frequency spectrum
2024-03-12 11:19:52 +01:00

29 lines
685 B
C++

#pragma once
#include <memory>
#include <vector>
#include "lasp_mathtypes.h"
#include "lasp_types.h"
/**
* \addtogroup dsp
* @{
*/
/**
* @brief Apply frequency domain smoothing to a Frequency domain (single
* sided)signal power spectrum
*
* @param freq Frequency range
* @param X Signal pwr
* @param w Parameter determining the smoothing with. 1 = 1/1 octave, 3 = 1/3th
* octave and so on
* @param power_correct Apply a correction to the whole spectrum to make the
* signal power equal to the unsmoothed signal power.
* @return vd Smoothed spectrum
*/
vd freqSmooth(const vd& freq, const vd& X, const unsigned w,
bool power_correct = false);
/** @} */