summaryrefslogtreecommitdiff
path: root/gr-digital/examples/example_timing.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/examples/example_timing.py')
-rwxr-xr-xgr-digital/examples/example_timing.py39
1 files changed, 30 insertions, 9 deletions
diff --git a/gr-digital/examples/example_timing.py b/gr-digital/examples/example_timing.py
index fd86acfb16..7274773a0f 100755
--- a/gr-digital/examples/example_timing.py
+++ b/gr-digital/examples/example_timing.py
@@ -1,6 +1,26 @@
#!/usr/bin/env python
-
-from gnuradio import gr, digital
+#
+# Copyright 2011,2012 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, digital, filter
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from optparse import OptionParser
@@ -36,15 +56,15 @@ class example_timing(gr.top_block):
data = scipy.exp(1j*poffset) * data
self.src = gr.vector_source_c(data.tolist(), False)
- self.rrc = gr.interp_fir_filter_ccf(sps, rrc_taps)
- self.chn = gr.channel_model(noise, foffset, toffset)
- self.off = gr.fractional_interpolator_cc(0.20, 1.0)
+ self.rrc = filter.interp_fir_filter_ccf(sps, rrc_taps)
+ self.chn = filter.channel_model(noise, foffset, toffset)
+ self.off = filter.fractional_interpolator_cc(0.20, 1.0)
if mode == 0:
- self.clk = gr.pfb_clock_sync_ccf(sps, gain, rrc_taps_rx,
- nfilts, nfilts//2, 3.5)
- self.taps = self.clk.get_taps()
- self.dtaps = self.clk.get_diff_taps()
+ self.clk = digital.pfb_clock_sync_ccf(sps, gain, rrc_taps_rx,
+ nfilts, nfilts//2, 3.5)
+ self.taps = self.clk.taps()
+ self.dtaps = self.clk.diff_taps()
self.vsnk_err = gr.vector_sink_f()
self.vsnk_rat = gr.vector_sink_f()
@@ -164,6 +184,7 @@ def main():
for i,d in enumerate(diff_taps):
D = 20.0*scipy.log10(abs(fftpack.fftshift(fftpack.fft(d, 10000))))
+ #D = 20.0*scipy.log10(abs(scipy.fft(d, 10000)))
s31.plot(t[i::nfilts].real, d, "-o")
s32.plot(D)