On Tue, Sep 23, 2008 at 9:35 AM, kaleem ahmad <[EMAIL PROTECTED]> wrote: > > Thanks Brian, > > But I am still confused what this code is doing: > > power = 0 > for tap in mywindow: > power += tap*tap > > # FIXME the log10 primitive is dog slow > log = gr.nlog10_ff(10, self.fft_size, > > -20*math.log10(self.fft_size)-10*math.log10(power/self.fft_size)) > > > Especially why this factor > "20*math.log10(self.fft_size)-10*math.log10(power/self.fft_size)" is used???
The loop is calculating the gain of the window and subtracting to maintain unity. > moreover nlog10_ff block actually computes -> n*log10(input) + k, can > someone explain what this k is doing and how can we compare this formulae to > traditional dB formulae i.e. 10log(input), or 20log(input). I haven't read the code, but I suspect it's for situations as stated above. Brian PS - Top posting is a little bit of a waste of bandwidth. Please try some inline posting as it maintains a bit more clarity: http://en.wikipedia.org/wiki/Posting_style _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio