[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r4172 - gnuradio/branches/developers/n4hy/ofdm/gnuradi
From: |
trondeau |
Subject: |
[Commit-gnuradio] r4172 - gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm |
Date: |
Wed, 20 Dec 2006 18:26:52 -0700 (MST) |
Author: trondeau
Date: 2006-12-20 18:26:52 -0700 (Wed, 20 Dec 2006)
New Revision: 4172
Added:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/fftshift.py
Log:
test program for fftshift and ifftshift -- needs to be moved
Added:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/fftshift.py
===================================================================
---
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/fftshift.py
(rev 0)
+++
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/fftshift.py
2006-12-21 01:26:52 UTC (rev 4172)
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+from gnuradio import gr
+
+class my_graph(gr.flow_graph):
+ def __init__(self):
+ gr.flow_graph.__init__(self)
+
+ length = 101
+
+ data_r = range(length)
+ data_i = range(length,2*length)
+ src_r = gr.vector_source_s(data_r, False)
+ src_i = gr.vector_source_s(data_i, False)
+ s2f_r = gr.short_to_float()
+ s2f_i = gr.short_to_float()
+ f2c = gr.float_to_complex()
+ s2v = gr.stream_to_vector(gr.sizeof_gr_complex, length)
+
+ shift = True
+ ifft = gr.fft_vcc(length, False, [], shift)
+ fft = gr.fft_vcc(length, True, [], shift)
+
+ v2s = gr.vector_to_stream(gr.sizeof_gr_complex, length)
+ snk_in = gr.file_sink(gr.sizeof_gr_complex, "fftshift.in")
+ snk_out = gr.file_sink(gr.sizeof_gr_complex, "fftshift.out")
+
+ self.connect(src_r, s2f_r, (f2c,0))
+ self.connect(src_i, s2f_i, (f2c,1))
+ self.connect(f2c, snk_in)
+ self.connect(f2c, s2v, ifft, fft, v2s, snk_out)
+
+
+def main():
+ fg = my_graph()
+ fg.start()
+ fg.wait()
+
+if __name__ == "__main__":
+ try:
+ main()
+ except KeyboardInterrupt:
+ pass
+
Property changes on:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/fftshift.py
___________________________________________________________________
Name: svn:executable
+ *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r4172 - gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm,
trondeau <=