discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] output of gr.argmax & gr.max


From: Brook Lin
Subject: Re: [Discuss-gnuradio] output of gr.argmax & gr.max
Date: Wed, 12 Mar 2008 12:31:31 -0700 (PDT)

self.connect(self.chan_filt,ss2v,pick_one,my_fft,my_mag,(my_argmax,0))
self.connect((my_argmax,0),self.my0_s2f,self.my0_probe)
self.connect((my_argmax,1),my_s2f,self.my_probe)

Thanks Tim. The code is clear. But I have questions on my0_probe and
my_probe. Are they fft.win, or numbersink or other kind of sink?

Thanks~~


Tim Meehan wrote:
> 
> I do this by sending the value of argmax to the gui using number_sink for
> the gui.
> BTW I sent a message to this list the other day questioning the "-20*
> math.log10(self.fft_size)..."
> in the line below (taken from your code above).  I argue it should be
> "-10*
> math.log10(self.fft_size)..."
> [from Brook Lin] 
> self.fft_size,-20*math.log10(self.fft_size)-10*math.log10
> (power/self.fft_size))
> Any comments?
> 
> Here is some quick code to display the max index of the FFT output in a
> gui
> 
>         ss2v = gr.streams_to_vector(gr.sizeof_gr_complex, 128)
>         pick_one = gr.keep_one_in_n(gr.sizeof_gr_complex * 128,1024)
>         my_fft = gr.fft_vcc(128,1,[])
>         my_mag = gr.complex_to_mag(128)
>         my_argmax = gr.argmax_fs(128)
>         my_s2f = gr.short_to_float()
>         self.my0_s2f = gr.short_to_float()
> 
>         self.connect(self.chan_filt
> ,ss2v,pick_one,my_fft,my_mag,(my_argmax,0))
>         self.connect((my_argmax,0),self.my0_s2f,self.my0_probe)
>         self.connect((my_argmax,1),my_s2f,self.my_probe)
> 
> #Now in the gui area
> 
>         self.my_number = numbersink2.number_sink_f(self.panel,label=
> "maxIndex",decimal_places=2)
> 
>             self.connect (self.my0_s2f, self.my_number)
>             vbox.Add (self.my_number.win, 4, wx.EXPAND)
> 
> 
> 
> Tim
> 
> On Tue, Mar 11, 2008 at 10:26 PM, Brook Lin <address@hidden> wrote:
> 
>>
>> And I also want to show this maximum value on the status bar in wxgui,
>> which
>> shows the fft plot in the gnuradio-example. Any suggestion?
>>
>> In short, when I run usrp_fft.py, how can I show the peak value on the
>> wxgui
>> window? Can I do it like what I did now?(I mean the code I attached
>> previously). If not, do you have some good idea to do it?
>>
>> Thanks,
>>
>> --
>> View this message in context:
>> http://www.nabble.com/output-of-gr.argmax---gr.max--tp15997864p15998547.html
>> Sent from the GnuRadio mailing list archive at Nabble.com.
>>
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
> 

-- 
View this message in context: 
http://www.nabble.com/output-of-gr.argmax---gr.max--tp15997864p16012522.html
Sent from the GnuRadio mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]