discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] FW: using numpy


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] FW: using numpy
Date: Sat, 16 Aug 2008 07:35:25 -0700
User-agent: Mutt/1.5.17 (2007-11-01)

On Thu, Aug 14, 2008 at 06:54:59AM -0700, Josh Blum wrote:
> You need to start the flow graph, let it run for a few 
> seconds/milliseconds, then get the data.
>
> Try making these changes:
>
>       import time
>
>       fg = gr.top_block()
>       .....
>       mult1  = gr.multiply_ff()
>       fg.connect(src, (mult1, 0))
>       fg.connect(cos_wav, (mult1, 1))
>
>       gate_I = gr.vector_sink_f()
>       fg.connect (mult1, gate_I)
>       
>       fg.start()
>       time.sleep(XXX) #enough time to collect data
>       fg.stop()
>
>       I_data = numpy.array(gate_I.data())
>
>

Like Josh said, or possibly better yet, add a gr.head and use fg.run
to collect exactly the number of samples that you want.

Eric




reply via email to

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