summaryrefslogtreecommitdiff
path: root/gr-analog/python/analog/qa_phase_modulator.py
diff options
context:
space:
mode:
authormormj <mormjb@gmail.com>2020-10-30 10:59:50 -0400
committerMarcus Müller <marcus@hostalia.de>2020-10-30 17:52:53 +0100
commit7a0948ba85758fba1cc3858ef99bfa600dcc7416 (patch)
tree610d7f9d773a193562def6df2d4b50f1bb3b3f86 /gr-analog/python/analog/qa_phase_modulator.py
parent12192ee7d58de95ddca35a3e93bfc172bdb5c820 (diff)
qa: run autopep8 formatting on qa python files
find ./ -iname qa*.py | xargs autopep8 --in-place -a -a mostly formats whitespace and gets rid of trailing semicolons
Diffstat (limited to 'gr-analog/python/analog/qa_phase_modulator.py')
-rw-r--r--gr-analog/python/analog/qa_phase_modulator.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/gr-analog/python/analog/qa_phase_modulator.py b/gr-analog/python/analog/qa_phase_modulator.py
index 305b6ee665..abf079d9fd 100644
--- a/gr-analog/python/analog/qa_phase_modulator.py
+++ b/gr-analog/python/analog/qa_phase_modulator.py
@@ -13,8 +13,9 @@ import math
from gnuradio import gr, gr_unittest, analog, blocks
+
def sincos(x):
- return math.cos(x) + math.sin(x) * 1j
+ return math.cos(x) + math.sin(x) * 1j
class test_phase_modulator(gr_unittest.TestCase):
@@ -29,7 +30,7 @@ class test_phase_modulator(gr_unittest.TestCase):
pi = math.pi
sensitivity = pi / 4
src_data = (1.0 / 4, 1.0 / 2, 1.0 / 4, -1.0 / 4, -1.0 / 2, -1 / 4.0)
- expected_result = tuple([sincos(sensitivity*x) for x in src_data])
+ expected_result = tuple([sincos(sensitivity * x) for x in src_data])
src = blocks.vector_source_f(src_data)
op = analog.phase_modulator_fc(sensitivity)
@@ -42,6 +43,6 @@ class test_phase_modulator(gr_unittest.TestCase):
result_data = dst.data()
self.assertComplexTuplesAlmostEqual(expected_result, result_data, 5)
+
if __name__ == '__main__':
gr_unittest.run(test_phase_modulator)
-