[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Spectrum_sense of a smaller banwidth
From: |
Dimitris Symeonidis |
Subject: |
Re: [Discuss-gnuradio] Spectrum_sense of a smaller banwidth |
Date: |
Mon, 9 Mar 2009 19:31:08 +0100 |
On Mon, Mar 9, 2009 at 17:22, Adi85 <address@hidden> wrote:
>
>
> Ok..here is my code and my error message:
>
> class topBlock(gr.top_block):
> def __init__(self):
> gr.top_block.__init__(self)
>
> fftsize = 4096
> udecim = 256
>
> mywin = window.blackmanharris(fftsize)
> fft = gr.fft_vcc(fftsize, True, mywin)
>
> signal = usrp.source_c(0,udecim) # signal from Basic RX,
> decimation=256
> throttle = gr.throttle(gr.sizeof_gr_complex, 100000) #
> throttle=100k
> v = gr.stream_to_vector(gr.sizeof_gr_complex, fftsize) # complex
> in, 4096 length
>
> v_sink = gr.vector_sink_c()
>
> self.connect(signal, throttle, v, fft, v_sink)
>
> # Do stuff with v_sink.data()
>
> if __name__ == "__main__":
> print "Initilizing.."
> tb = topBlock()
> print "Flowgraph start.."
> tb.start()
> print "Exiting.."
>
>
> Error message:
> Initilizing..
> Traceback (most recent call last):
> File "u0.py", line 30, in <module>
> tb = topBlock()
> File "u0.py", line 24, in __init__
> self.connect(signal, throttle, v, fft, v_sink)
> File "/usr/local/lib/python2.5/site-packages/gnuradio/gr/top_block.py",
> line 70, in connect
> self._connect(points[i-1], points[i])
> File "/usr/local/lib/python2.5/site-packages/gnuradio/gr/top_block.py",
> line 76, in _connect
> dst_block.basic_block(), dst_port)
> File
> "/usr/local/lib/python2.5/site-packages/gnuradio/gr/gnuradio_swig_py_runtime.py",
> line 1469, in connect
> return _gnuradio_swig_py_runtime.gr_top_block_sptr_connect(*args)
> ValueError: itemsize mismatch: fft_vcc_fftw(1):0 using 32768,
> vector_sink_c(5):0 using 8
>
>
> To be more specific I have a complex fft connected to a complex vectors sink
> so I do not know why it apears Item size mismatch!
>
> Thank you
> --
> View this message in context:
> http://www.nabble.com/Spectrum_sense-of-a-smaller-banwidth-tp22413464p22413681.html
> Sent from the GnuRadio mailing list archive at Nabble.com.
>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
throw out the gr.throttle and the gr.stream_to_vector
Dimitris Symeonidis
"If you think you're too small to make a difference, try sleeping with
a mosquito!" - Amnesty International