diff options
Diffstat (limited to 'gr-atsc/src/python/fpll.py')
-rwxr-xr-x | gr-atsc/src/python/fpll.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gr-atsc/src/python/fpll.py b/gr-atsc/src/python/fpll.py index aed975557a..dee81da13d 100755 --- a/gr-atsc/src/python/fpll.py +++ b/gr-atsc/src/python/fpll.py @@ -21,6 +21,8 @@ # from gnuradio import gr, atsc +from gnuradio import blocks +from gnuradio import filter import math, os def main(): @@ -29,7 +31,7 @@ def main(): tb = gr.top_block() - u = gr.file_source(gr.sizeof_float,"/tmp/atsc_pipe_2") + u = blocks.file_source(gr.sizeof_float,"/tmp/atsc_pipe_2") input_rate = 19.2e6 IF_freq = 5.75e6 @@ -38,7 +40,7 @@ def main(): # 1/2 as wide because we're designing lp filter symbol_rate = atsc.ATSC_SYMBOL_RATE/2. NTAPS = 279 - tt = gr.firdes.root_raised_cosine (1.0, input_rate, symbol_rate, .115, NTAPS) + tt = filter.firdes.root_raised_cosine (1.0, input_rate, symbol_rate, .115, NTAPS) # heterodyne the low pass coefficients up to the specified bandpass # center frequency. Note that when we do this, the filter bandwidth # is effectively twice the low pass (2.69 * 2 = 5.38) and hence @@ -47,7 +49,7 @@ def main(): t=[] for i in range(len(tt)): t += [tt[i] * 2. * math.cos(arg * i)] - rrc = gr.fir_filter_fff(1, t) + rrc = filter.fir_filter_fff(1, t) fpll = atsc.fpll() @@ -55,20 +57,20 @@ def main(): lower_edge = 6e6 - 0.31e6 upper_edge = IF_freq - 3e6 + pilot_freq transition_width = upper_edge - lower_edge - lp_coeffs = gr.firdes.low_pass (1.0, + lp_coeffs = filter.firdes.low_pass (1.0, input_rate, (lower_edge + upper_edge) * 0.5, transition_width, - gr.firdes.WIN_HAMMING); + filter.firdes.WIN_HAMMING); - lp_filter = gr.fir_filter_fff (1,lp_coeffs) + lp_filter = filter.fir_filter_fff (1,lp_coeffs) alpha = 1e-5 - iir = gr.single_pole_iir_filter_ff(alpha) - remove_dc = gr.sub_ff() + iir = filter.single_pole_iir_filter_ff(alpha) + remove_dc = blocks.sub_ff() - out = gr.file_sink(gr.sizeof_float,"/tmp/atsc_pipe_3") - # out = gr.file_sink(gr.sizeof_float,"/mnt/sata/atsc_data_float") + out = blocks.file_sink(gr.sizeof_float,"/tmp/atsc_pipe_3") + # out = blocks.file_sink(gr.sizeof_float,"/mnt/sata/atsc_data_float") tb.connect(u, fpll, lp_filter) tb.connect(lp_filter, iir) |