Yes! I realised that right after sending the message. I was confused because 
the results were not making sense to me (I was computing the bins resolution in 
the wrong way, using the reduced sample rate due to FFT overlapping instead of 
the original one), and I ended up asking a stupid question... Sorry about that 
:)

I don't know if you asked because you are familiarised with the function's code 
or because you just saw my mistake, but if it's the first case I want to ask 
something else. My real problem was that in this line:

freq = center_freq - (tb.usrp_rate / 2) + (tb.channel_bandwidth * i_bin)

I think that the "tb.channel_bandwidth" should be the bins resolution, because 
otherwise the value of "freq" is far away from the values it can take when 
centered on "center_freq" (like happens in my case where the channel bandwidth 
is much larger than the resolution).

For example, if I am centered in 928.8MHz with samp_rate=10MHz, FFT_size=1024 
and channelBW=200kHz, according to the formula the frequency of the last bin 
would be:

freq = 928.8M - (10M/2) + 1023*200k = 1128.4MHz

This value is far away from the frequency of the last bin that you get when 
doing an FFT with those parameters (considering that the resolution is 
9765.625Hz/bin the last bin should go from 938.7902344MHz to 938.8MHz). Am I 
missing something?

Thank you both for your answer,

Marc
On 25/01/2017 9:38:01, Sylvain Munaut <246...@gmail.com> wrote:
> Does anyone know why the first and last 25% of FFT bins are discarded? I am
> talking about the following lines of code:
>
> line 267: bin_start = int(tb.fft_size * ((1 - 0.75) / 2))
> line 277: bin_stop = int(tb.fft_size - bin_start)

Read that code again ... it discards the first and last 12.5% ... so
that it discards 25% in total.


Cheers,

Sylvain
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to