i have some question regarding the y-axis in usrp_fft.py… it is
labeled in unit dB. so how does it convert from ADC value to dB?

Using the formula below.

second, what is this formula mean?
log = gr.nlog10_ff(10, self.fft_size,
-20math.log10(self.fft_size)-10math.log10(power/self.fft_size)).

Adib

This formula is used to convert the FFT output value to dB. This is
relative conversion and the values does not mean actual power because
the actuall power value depends on other factors such as RF gain used.
What is meant by relative, is that if the input signal power is (for
example) -20dBm and we measured it in this formula as (say) 50dB, then
when we change the signal power to -30dBm, we get 40dB from the output
of this formula. So, lowering signal power level by 10dBm result a 10dB
value reduction from the formula output.

So, what is the factors that effect dB conversion?. The first value is
the FFT size, so that when we change the FFT size, the formula should
compensate for this. Second we should compensate for the taps of the
window used for FFT (Hanning, Hamming,…etc).

So, what is the factors that effect dB conversion?. The first value is the
FFT size, so that when we change the FFT size, the formula should
compensate for this. Second we should compensate for the taps of the
window used for FFT (Hanning, Hamming,…etc).

is the fft_size effect the value of db? for plotting the GUI (the
display of
the spectrum analyzer) in fftsink_nongl.py, inside the set_data
function, we
can see that each of the bin of the fft is treated as individual i.e
evt.data[0], evt.data[1], evt.data[2], and so on. this data is use to
plot
the graph inside the GUI of the spectrum analyzer. so if the bin of fft
is
treated as individual, what is the relationship between fft_size and the
db
calculation? what is the usage of fft_size in the calculation?

if i choose to monitor the 2.5G center frequency, so the evt.data[0] is
the
place where the 2.5G is right? if the fusb is 4Ms/s and our fft bin is
256,
so our bandwidth of monitoring is only 2MHz right? and evt.data[1] to
evt.data[128] is the positive side of my signal while evt.data[129] to
evt.data[256] is my negative side… am i right?