diff options
Diffstat (limited to 'gr-atsc/src/python')
-rw-r--r-- | gr-atsc/src/python/.gitignore | 9 | ||||
-rw-r--r-- | gr-atsc/src/python/CMakeLists.txt | 8 | ||||
-rw-r--r-- | gr-atsc/src/python/Makefile.am | 43 | ||||
-rw-r--r-- | gr-atsc/src/python/README | 2 | ||||
-rw-r--r-- | gr-atsc/src/python/atsc_utils.py | 12 | ||||
-rwxr-xr-x | gr-atsc/src/python/btl-fsd.py | 10 | ||||
-rwxr-xr-x | gr-atsc/src/python/fpll.py | 12 | ||||
-rwxr-xr-x | gr-atsc/src/python/interp.py | 12 | ||||
-rwxr-xr-x | gr-atsc/src/python/interp_short.py | 10 | ||||
-rwxr-xr-x | gr-atsc/src/python/qa_atsc.py | 22 | ||||
-rw-r--r-- | gr-atsc/src/python/run_tests.in | 10 | ||||
-rwxr-xr-x | gr-atsc/src/python/viterbi-out.py | 12 | ||||
-rwxr-xr-x | gr-atsc/src/python/xlate.py | 10 |
13 files changed, 55 insertions, 117 deletions
diff --git a/gr-atsc/src/python/.gitignore b/gr-atsc/src/python/.gitignore deleted file mode 100644 index bf03975bb..000000000 --- a/gr-atsc/src/python/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/run_tests diff --git a/gr-atsc/src/python/CMakeLists.txt b/gr-atsc/src/python/CMakeLists.txt index 4c2442ba0..d38d6d803 100644 --- a/gr-atsc/src/python/CMakeLists.txt +++ b/gr-atsc/src/python/CMakeLists.txt @@ -1,17 +1,17 @@ # 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, diff --git a/gr-atsc/src/python/Makefile.am b/gr-atsc/src/python/Makefile.am deleted file mode 100644 index 7b2f5c871..000000000 --- a/gr-atsc/src/python/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright 2004,2009 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. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST += \ - run_tests.in - -ourdatadir = $(exampledir)/atsc - -dist_ourdata_DATA = \ - README - -dist_ourdata_SCRIPTS = \ - btl-fsd.py \ - fpll.py \ - interp.py \ - xlate.py \ - viterbi-out.py - -TESTS = run_tests - -noinst_PYTHON = \ - atsc_utils.py \ - qa_atsc.py diff --git a/gr-atsc/src/python/README b/gr-atsc/src/python/README index 6c23b46fd..74d6ba134 100644 --- a/gr-atsc/src/python/README +++ b/gr-atsc/src/python/README @@ -7,7 +7,7 @@ station frequency from the fcc video database, and sample rate to 6.4e6. 2) Capture data - adjust gain (-g) frequency (-f) and which side the tvrx is on to fit your local setup: -uhd_rx_cfile.py -s --samp-rate=6.4e6 -g 65 -f 503e6 atsc_data_6-4m_complex +uhd_rx_cfile.py -s --samp-rate=6.4e6 -g 65 -f 503e6 atsc_data_6-4m_complex You probably still need fast disks to take the data, like a raid-0 set of striped sata drives. Make sure there are no or very few Ou overruns. Saving diff --git a/gr-atsc/src/python/atsc_utils.py b/gr-atsc/src/python/atsc_utils.py index 1e74d22ed..fced6d190 100644 --- a/gr-atsc/src/python/atsc_utils.py +++ b/gr-atsc/src/python/atsc_utils.py @@ -1,23 +1,23 @@ # # Copyright 2006 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. -# +# import random import sys @@ -42,7 +42,7 @@ def make_fake_transport_stream_packet(npkts): for n in range(186): r[i + n] = random.randint(0, 255) i = i + 186 - + return r diff --git a/gr-atsc/src/python/btl-fsd.py b/gr-atsc/src/python/btl-fsd.py index 37f3f9806..826e71016 100755 --- a/gr-atsc/src/python/btl-fsd.py +++ b/gr-atsc/src/python/btl-fsd.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# from gnuradio import gr from gnuradio import atsc diff --git a/gr-atsc/src/python/fpll.py b/gr-atsc/src/python/fpll.py index 24bc7277f..aed975557 100755 --- a/gr-atsc/src/python/fpll.py +++ b/gr-atsc/src/python/fpll.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# from gnuradio import gr, atsc import math, os @@ -36,7 +36,7 @@ def main(): # 1/2 as wide because we're designing lp filter - symbol_rate = atsc.ATSC_SYMBOL_RATE/2. + symbol_rate = atsc.ATSC_SYMBOL_RATE/2. NTAPS = 279 tt = gr.firdes.root_raised_cosine (1.0, input_rate, symbol_rate, .115, NTAPS) # heterodyne the low pass coefficients up to the specified bandpass diff --git a/gr-atsc/src/python/interp.py b/gr-atsc/src/python/interp.py index b17b3a312..8a3cc8d4c 100755 --- a/gr-atsc/src/python/interp.py +++ b/gr-atsc/src/python/interp.py @@ -1,31 +1,31 @@ #!/usr/bin/env /usr/bin/python # # Copyright 2004,2007 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# # This module starts the atsc processing chain taking the captured # off-air signal created with: # # uhd_rx_cfile.py --samp-rate=6.4e6 # -f <center of tv signal channel freq> # -g <appropriate gain for best signal / noise> -# +# # All this module does is multiply the sample rate by 3, from 6.4e6 to # 19.2e6 complex samples / sec, then lowpass filter with a cutoff of 3.2MHz # and a transition band width of .5MHz. Center of the tv channels is diff --git a/gr-atsc/src/python/interp_short.py b/gr-atsc/src/python/interp_short.py index 732ca831d..c5ea337f9 100755 --- a/gr-atsc/src/python/interp_short.py +++ b/gr-atsc/src/python/interp_short.py @@ -1,24 +1,24 @@ #!/usr/bin/env /usr/bin/python # # Copyright 2004 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 2, 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# # This module starts the atsc processing chain taking the captured # off-air signal created with: # diff --git a/gr-atsc/src/python/qa_atsc.py b/gr-atsc/src/python/qa_atsc.py index 63621bd90..c6b8d2e95 100755 --- a/gr-atsc/src/python/qa_atsc.py +++ b/gr-atsc/src/python/qa_atsc.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2006,2007 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, gr_unittest import atsc # qa code needs to run without being installed @@ -44,7 +44,7 @@ class memoize(object): """ Make a fake transport stream that's big enough for our purposes. We generate 8 full fields. This is relatively expensive. It -takes about 2 seconds to execute. +takes about 2 seconds to execute. """ make_transport_stream = \ memoize(lambda : tuple(make_fake_transport_stream_packet(8 * atsc.ATSC_DSEGS_PER_FIELD))) @@ -75,11 +75,11 @@ class vector_source_ts(gr.hier_block2): def __init__(self, ts): """ Pad tranport stream packets to 256 bytes and reformat appropriately. - + @param ts: MPEG transport stream. @type ts: sequence of ints in [0,255]; len(ts) % 188 == 0 """ - + src = gr.vector_source_b(pad_transport_stream(ts)) s2v = gr.stream_to_vector(gr.sizeof_char, atsc.sizeof_atsc_mpeg_packet) @@ -163,7 +163,7 @@ class qa_atsc(gr_unittest.TestCase): def test_loopback_002(self): """ Loopback randomizer/rs_encoder/interleaver to - deinterleaver/rs_decoder/derandomizer + deinterleaver/rs_decoder/derandomizer """ src_data = make_transport_stream() interleaver_delay = 52 @@ -188,7 +188,7 @@ class qa_atsc(gr_unittest.TestCase): """ Loopback randomizer/rs_encoder/interleaver/trellis_encoder via ds_to_softds to - viterbi_decoder/deinterleaver/rs_decoder/derandomizer + viterbi_decoder/deinterleaver/rs_decoder/derandomizer """ src_data = make_transport_stream() interleaver_delay = 52 @@ -211,7 +211,7 @@ class qa_atsc(gr_unittest.TestCase): result_data = dst.data ()[((interleaver_delay+viterbi_delay)*atsc.ATSC_MPEG_PKT_LENGTH):len(dst.data())] self.assertEqual (expected_result, result_data) - + if __name__ == '__main__': gr_unittest.main() diff --git a/gr-atsc/src/python/run_tests.in b/gr-atsc/src/python/run_tests.in deleted file mode 100644 index 561917fed..000000000 --- a/gr-atsc/src/python/run_tests.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# 1st parameter is absolute path to component source directory -# 2nd parameter is absolute path to component build directory -# 3rd parameter is path to Python QA directory - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-atsc \ - @abs_top_builddir@/gr-atsc \ - @srcdir@ diff --git a/gr-atsc/src/python/viterbi-out.py b/gr-atsc/src/python/viterbi-out.py index eedbaa5d6..67edd99b2 100755 --- a/gr-atsc/src/python/viterbi-out.py +++ b/gr-atsc/src/python/viterbi-out.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2006,2007 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# from gnuradio import gr, atsc import sys, os @@ -46,7 +46,7 @@ def main(args): tb.connect(src, viterbi, deinter, rs_dec, derand, depad, dst) tb.run () - + if __name__ == '__main__': main(sys.argv[1:]) diff --git a/gr-atsc/src/python/xlate.py b/gr-atsc/src/python/xlate.py index e37af9a22..68e280a8c 100755 --- a/gr-atsc/src/python/xlate.py +++ b/gr-atsc/src/python/xlate.py @@ -1,24 +1,24 @@ #!/usr/bin/env /usr/bin/python # # Copyright 2004,2007 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# # This module upconverts the 19.2e6 sample rate signal from a center # of 0 to 5.75e6 and converts to float, to prepare the signal for # the old gnuradio 0.9 block (bit timing loop, field sync checker, |