FFT Plot and Benchmark

Hi all,

I have edited benchmark_tx.py to shift between 3 different frequencies,
depending upon which one is free after sensing the apectrum. i have made
a
separate program which senses the spectrum and it is called in
benchmark_tx.

Thus the system switches between transmit (benchmark_tx) and receive
(sensing) mode on a regular basis.

This works fine.

The problem arises when i want to show on the situation of the spectrum
on a
FFT Plot. I ran the GRC flowgraph (USRP Source–>FFT Sink) in parallel
with
the above mentioned programs. But it doesnt work.

Can someone help me in finding out how to add FFT Plot in the above
programs.

Regards,
Ali

On Thu, Jul 09, 2009 at 01:44:36PM +0600, ali siddiqi wrote:

The problem arises when i want to show on the situation of the spectrum on a
FFT Plot. I ran the GRC flowgraph (USRP Source–>FFT Sink) in parallel with
the above mentioned programs. But it doesnt work.

Can someone help me in finding out how to add FFT Plot in the above
programs.

If you look at gr-wxgui/src/python/fftsink_gl.py or fftsink_nongl.py
you’ll see that there is a complete standalone example at the bottom.

You basically just instantiate a fft_sink_c or _f.

Eric

Hi all,
I looked at fftsink_gl.py. It couldnt be executed because of import
error of
fft_window. Also, if in case I manage
to run it, still I am finding it difficult to incoporate it in
benchmark_tx.py. Can someone elaborate a bit more on how to add FFT sink
in
benchmark_tx?

Regards,
Ali

Ali Siddiqi wrote:

Regards,
Ali

Good day,
is there any progress in this Mr Ali? i also very interested to try
this…
if you have any progress please post it again…:slight_smile: thank you very much
in
advance

Adib

View this message in context:
http://www.nabble.com/FFT-Plot-and-Benchmark-tp24405668p24442557.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Ali Siddiqi wrote:

Regards,
Ali

i try to work on this also but i still cannot put fftsink_nongl.py and
benchmark_tx or benchmark_rx together… the problem i face is
benchmark_*
have its own flowgraph which use .start and .wait for it to run… i.e
tb.start and tb.wait while fftsink_nongl use stdgui2.stdapp and Mainloop
to
run… i.e

app = stdgui2.stdapp(app_top_block, "USRP FFT", nstatus=1)
app.MainLoop()

when i run tb.start or tb.run and tb.wait, it seem that my fftsink_nongl
that i had connect with usrp_source in the first place is stopping…

so can any body help me on combining this two system together? how to
run
this two flowgraph together? what i want to do is i want to sense the
spectrum using fftsink_nongl.py and looking for spectrum hole and access
the
hole by using benchmark_tx and benchmark_rx…

thank you in advance

Adib

View this message in context:
http://www.nabble.com/FFT-Plot-and-Benchmark-tp24405668p24750422.html
Sent from the GnuRadio mailing list archive at Nabble.com.

adib_sairi wrote:

thank you in advance

Adib

The coupling of the flow graph and the Wx architecture was one of my
motivations for writing the gr-qtgui. You should be able to “from
gnuradio.qtgui import qtgui” then drop a sink (qtgui.sink_c(args)) and
connect the signal block you want to observe to this sink. Remember that
when you start the flow graph use “tb.start()” and not “tb.run()” and
then execute the Qt application with a “qapp.exec_()”, which blocks
until closed.

Note that you’ll have to install a few Qt-related things (Qt > 4.3,
PyQt, QWT, and QWT Plot 3D). If you running Ubuntu or Fedora, these are
available from your package manager.

You can find examples of how to use this in gr-qtgui/src/python with
more complicated examples that allow you to build a full QT application
with the sink display embedded in it. If you just use a sink and start
the QApp, you just get a modal dialog box. You can have multiple QT
sinks going at once, too.

Tom

Tom R. wrote:

Note that you’ll have to install a few Qt-related things (Qt > 4.3,

thank you Tom. I had run the usrp_display.py inside the gr-qtgui, it was
very interesting. I see that you doesn’t use the wxpyton any more and
you
use the qtgui isn’t it?

but I cannot find where it do the inserting data for plotting process.
in
usrp_fft.py it use the fftsink_nongl.py or fftsink_gl.py for the
plotting
process right?and fftsink_nongl.py insert the data for plotting in
set_data
function inside the fft_window class. so in fftsink_nongl.py, I tab the
evt.data (inside the set_data function) and manipulate it to do my
sensing
mechanism.

I see that the usrp_display.py call the qtgui.py for the plotting
process
and I think qtgui.py call it’s C++ file for further processes isn’t it?
so
how and where can I can tab the data like evt.data in usrp_display or
qtgui?
could you please explain a bit on how does usrp_display do the plotting
process?

thank you very much.

Adib


View this message in context:
http://www.nabble.com/FFT-Plot-and-Benchmark-tp24405668p24766931.html
Sent from the GnuRadio mailing list archive at Nabble.com.

adib_sairi wrote:

sensing mechanism.

I had search some more and found out that for the frequency plot, you
use
FrequencyDisplayPlot (.h and .cc) right? and i found that you use the
_dataPoints pointer to plot the graph. i manage to tab the data by using
_dataPoints[which]… but manipulating in c++ seams to be quite
complicated.
i would like to return and import this value (_dataPoints) to python but
i
don’t know how… could somebody guide me for this? i think
fftsink_nongl.py
does receive some data from c++ file (i think) but i also don’t know
how…
please somebody help me for this…

thank you very much in advance…

Adib


View this message in context:
http://www.nabble.com/FFT-Plot-and-Benchmark-tp24405668p24771599.html
Sent from the GnuRadio mailing list archive at Nabble.com.