summaryrefslogtreecommitdiff
path: root/gr-analog/python/analog/qa_phase_modulator.py
diff options
context:
space:
mode:
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)
-