Forum: GNU Radio Re: Wideband Spectrum Analyzer

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
36d6b4ceb15343f9e412cc17be319902?d=identicon&s=25 Santi Ortega (Guest)
on 2008-10-22 21:21
(Received via mailing list)
Attachment: spectrum.ps (20 KB)
I obtain this plot from 2.23GHz to 2.90GHz (with a Flex2400) but I
don't know how to put the correct frecuency on the x axis.
Because if I put this:
g('set xrange[2230000000:2900000000]') # I can't see anything!

To plot I have done this:

g = Gnuplot.Gnuplot(debug=1) # Out of the while loop

    g.plot(m.data) # Inside the while loop


Please help me as soon as possible and thanks in advance!

Regards,

Santiago Ortega.
36d6b4ceb15343f9e412cc17be319902?d=identicon&s=25 Santi Ortega (Guest)
on 2008-10-28 12:48
(Received via mailing list)
*USRP_SPECTRUM_SENSE.PY*

How can I use the *self.max_freq* and *self.min_freq* like a global
variable?
I want to use it in the *def main_loop(tb):*
but if I use it

*That's the given error:*
*Traceback (most recent call last):
  File "./spectrum_output.py", line 309, in <module>
    main_loop(tb)
  File "./spectrum_output.py", line 246, in main_loop
    print min_freq, max_freq
NameError: global name 'min_freq' is not defined*

I tried to put
*max_freq = self.max_freq
min_freq = self.min_freq*
in the
class my_top_block(gr.top_block):

    def __init__(self):
        gr.top_block.__init__(self)

where it's the first time it's used.
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2008-10-28 12:51
(Received via mailing list)
On Tue, Oct 28, 2008 at 11:43:15AM +0000, Santi Ortega wrote:
> *USRP_SPECTRUM_SENSE.PY*
>
> How can I use the *self.max_freq* and *self.min_freq* like a global
> variable?
> I want to use it in the *def main_loop(tb):*
> but if I use it

Please see the Python tutorial.  It and lots of other good stuff can
be found here:   http://python.org/doc

Eric
This topic is locked and can not be replied to.