1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00

dft: warn when max amplitude at boundary of freq bins

This commit is contained in:
Manuel Pitz 2021-06-23 20:28:00 +02:00
parent 15a71df357
commit b26625184f

View file

@ -372,6 +372,8 @@ public:
}
if (freqEstType == FreqEstimationType::QUADRATIC) {
if (maxPos < 1 || maxPos >= freqCount - 1)
logger->warn("Maximum frequency bin lies on window boundary. Using non-estimated results!");
else {
Point a = { absDftFreqs[maxPos - 1], absDftResults[i][maxPos - 1] };
Point b = { absDftFreqs[maxPos + 0], absDftResults[i][maxPos + 0] };