discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Modifying vectors


From: Patrick Strasser
Subject: Re: [Discuss-gnuradio] Modifying vectors
Date: Sun, 19 Mar 2006 22:53:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050602 Thunderbird/1.0.2 Mnenhy/0.7.2.0

Eric Blossom wrote:
On Fri, Mar 17, 2006 at 10:27:45AM +0100, Patrick Strasser wrote:

Hello!
       fft = gr.fft_vfc(fft_size, True, window.hanning(fft_size))
       ifft = gr.fft_vcc(fft_size, False, window.hanning(fft_size))

       self.connect(s2p, fft      )
       self.connect(fft, ifft     )
       self.connect(ifft, p2s     )
>>
now I want to modify data between fft and ifft.
Do I have to make a custom block in python (I'd like to do this anyway...)?

Depends on what you want to do.  A few of the blocks support an
optional "vlen" constructor argument.  These will apply the given
operation to a vector of items.

If for example you want to independently filter the bins, you could
use gr.stream_to_streams, a bunch of filter blocks, then
gr.streams_to_stream.  See
gnuradio-core/src/python/gnuradio/blksimpl/filterbank.py

So you can use these blocks with vectors of that type too. Clever shortcut!

No, I want to interpolate between the bins. I want to modify the spextrum. I know there is at least one other way (resampling), but this is the most straight forward way for me.

This isn't completely sorted out.  Besides adding the "vlen" attribute
to many blocks, we've also considered using a Numeric  / NumPy / SciPy
"ufunc" (universal function) mechanism and then a small number of
GNU Radio blocks that know how to apply ufuncs across streams.
"ufuncs" would probably be easier to write in the common cases than
full GNU Radio blocks.

And a ufunc would be able to modify the stream on the fly?

Patrick
--
Engineers motto: cheap, good, fast: choose any two
Patrick Strasser <patrick dot strasser at  tugraz dot at>
Student of Telematik, Techn. University Graz, Austria




reply via email to

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