[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] gr.fft_vcc usage in make_fft_sink_X
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] gr.fft_vcc usage in make_fft_sink_X |
Date: |
Wed, 16 Mar 2005 15:55:35 -0800 |
User-agent: |
Mutt/1.5.6i |
On Wed, Mar 16, 2005 at 05:34:13PM -0500, cswiger wrote:
> On Wed, 16 Mar 2005, Eric Blossom wrote:
> >
> > serial_to_parallel and parallel_to_serial are format converters.
> >
> > The gr.fft_vcc block requires a vector of complex numbers for its
> > input and produces a vector of complex numbers on its output.
> > serial_to_parallel takes a stream of items and turns them into a
> > stream of vectors. parallel_to_serial is the inverse.
> >
>
> Ok - stuff like this runs:
>
> src = gr.sig_source_f (sample_rate,gr.GR_SIN_WAVE,440,1,0)
> s2p = gr.serial_to_parallel (gr.sizeof_float, fft_size)
> fft = gr.fft_vfc (fft_size,True,True)
> p2s = gr.parallel_to_serial (gr.sizeof_gr_complex, fft_size)
> dst = gr.file_sink (gr.sizeof_gr_complex, "fft_test")
>
This would work fine.
In this particular case you can reduce this to:
> src = gr.sig_source_f (sample_rate,gr.GR_SIN_WAVE,440,1,0)
> s2p = gr.serial_to_parallel (gr.sizeof_float, fft_size)
> fft = gr.fft_vfc (fft_size,True,True)
> dst = gr.file_sink (gr.sizeof_gr_complex * fft_size, "fft_test")
> now I just have to get a grasp on what, precisely, it means ;)
Oh, that...
> Appearently there are no(t yet) vector stream operators - such as add,
> multiply ? Python would be too slow...
Stay tuned... Or better yet, contribute patches ;-)
They'll be straight-forward extensions of the add, add_const, mult,
mult_const, sub and divide blocks. Take a look at
gr_complex_to_xxx.{h,cc} to see what I changed to make them apply to
vectors.
> --Chuck
Eric