Forum: GNU Radio stream_to_vector and numpy vectors

3149e6dc85a56c6d5bba78fa958996c0?d=identicon&s=25 vegihat vegihat (vegihat)
on 2013-05-29 21:32
(Received via mailing list)
hello, i want to write a simple energy detector without using c++, only
existence blocks and the  numpy lib

So far, i have the following graph

usrp_source -> head -> stream_to_vector

could i read the values from stream_to_vector  and write them to a
numpy-vector? is it possible?
4252201ac30d6dd44d8090ce1070e35f?d=identicon&s=25 Josh Blum (Guest)
on 2013-05-29 22:21
(Received via mailing list)
On 05/29/2013 02:31 PM, vegihat vegihat wrote:
> hello, i want to write a simple energy detector without using c++, only
> existence blocks and the  numpy lib
>
> So far, i have the following graph
>
> usrp_source -> head -> stream_to_vector
>
> could i read the values from stream_to_vector  and write them to a
> numpy-vector? is it possible?
>

Yes. Rather than use the stream to vector, create a python block. This
block's work function will get called with the sample data from head as
a numpy array.

-josh
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.