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:
parent
15a71df357
commit
b26625184f
1 changed files with 2 additions and 0 deletions
|
@ -372,6 +372,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (freqEstType == FreqEstimationType::QUADRATIC) {
|
if (freqEstType == FreqEstimationType::QUADRATIC) {
|
||||||
|
if (maxPos < 1 || maxPos >= freqCount - 1)
|
||||||
|
logger->warn("Maximum frequency bin lies on window boundary. Using non-estimated results!");
|
||||||
else {
|
else {
|
||||||
Point a = { absDftFreqs[maxPos - 1], absDftResults[i][maxPos - 1] };
|
Point a = { absDftFreqs[maxPos - 1], absDftResults[i][maxPos - 1] };
|
||||||
Point b = { absDftFreqs[maxPos + 0], absDftResults[i][maxPos + 0] };
|
Point b = { absDftFreqs[maxPos + 0], absDftResults[i][maxPos + 0] };
|
||||||
|
|
Loading…
Add table
Reference in a new issue