You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When display a single test tone of amplitude 1.0 in the Periodogram or Spectrogram display the amplitude seams down from were it should be. 3dB down for complex and 9dB down for real signals.
It does not seam to be significantly affected by the windowing mode.
But adjusting the "Full Scale" parm fixes the the issue. eg 1.0 *sqrt(1/2) for complex bring the displayed amplitude to were i would expect.
Complex normal
Complex adjusted
Real normal
Real adjusted
I see this bug under the Pothos v0.7.0-g42d23cb1
The text was updated successfully, but these errors were encountered:
If you send in a DC tone at 1.0 amplitude and set the window to rectangular you should see exactly 0 dBfs (if the full scale is 0). One you change the frequency or window, you start to spread out that power among multiple fft bins. The total cumulative power of those bins should add up to 0 dBfs. In the example above, you have two powerful bins which are down about 3dB, so the cumulative power is correct.
By selecting a normalized frequency of 0.1 and FFT size 1024, you're seeing spectral leakage since your tone is not perfectly centered on an FFT bin (0.1*1024=102.4, a non-integer). This leads to scalloping loss, which is a function of the window used. For your chosen Hann window, the maximum scalloping loss is -1.42 dB if the tone is exactly halfway between bins, but it will be slightly less for your case. Choosing a normalized frequency of 1/1024*102=0.099609375 would put you on the nearest FFT bin center, and you should see the scalloping loss go away.
The Fourier transform of the Hann window shows that there are 3 dominant coefficients that constitute the main lobe of the Hann window's frequency response. By windowing in the time domain, you're convolving the Hann window's frequency response with your tone in the frequency domain. Thus most of the energy of your tone will get distributed into the 3 FFT bins centered around your tone, but the center bin will not have amplitude 1, but rather 0.5, hence -3 dB down from peak.
Edit: an earlier version of this comment incorrectly stated that WaveformSource sets Re{z}=1 and Im{z}=1, which has a magnitude of SQRT(1^2+1^2) ~ 1.414. In fact, WaveformSource populates a wave table using std::polar, which handles normalizing the real and imaginary parts by 1/SQRT(2), thus the magnitude is 1, and therefore dBFS=0.
When display a single test tone of amplitude 1.0 in the Periodogram or Spectrogram display the amplitude seams down from were it should be. 3dB down for complex and 9dB down for real signals.
It does not seam to be significantly affected by the windowing mode.
But adjusting the "Full Scale" parm fixes the the issue. eg 1.0 *sqrt(1/2) for complex bring the displayed amplitude to were i would expect.
Complex normal
![complex normal](https://user-images.githubusercontent.com/5248379/75263141-b15cf800-5841-11ea-8489-555e900091f0.png)
![complex ajusted](https://user-images.githubusercontent.com/5248379/75263149-b3bf5200-5841-11ea-8e2e-e91d0adeb688.png)
Complex adjusted
Real normal
![real normal](https://user-images.githubusercontent.com/5248379/75263875-a9ea1e80-5842-11ea-9fc9-9750569ea28e.png)
![real ajusted](https://user-images.githubusercontent.com/5248379/75263882-ace50f00-5842-11ea-8d93-8927f1058dc1.png)
Real adjusted
I see this bug under the Pothos v0.7.0-g42d23cb1
The text was updated successfully, but these errors were encountered: