[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/01: digital: fixed psk and qam constella
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/01: digital: fixed psk and qam constellation table generators. Not sure how these got out of sync. |
Date: |
Wed, 2 Jul 2014 22:12:26 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch maint
in repository gnuradio.
commit a6c837e184f4bbf6a0d5c15b8c9ca75294a64f0f
Author: Tom Rondeau <address@hidden>
Date: Wed Jul 2 17:10:30 2014 -0400
digital: fixed psk and qam constellation table generators. Not sure how
these got out of sync.
---
.../python/digital/constellation_map_generator.py | 14 ++++++------
gr-digital/python/digital/psk_constellations.py | 25 +++++++++++-----------
gr-digital/python/digital/qam_constellations.py | 24 ++++++++++-----------
3 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/gr-digital/python/digital/constellation_map_generator.py
b/gr-digital/python/digital/constellation_map_generator.py
index bf68967..1dedd81 100644
--- a/gr-digital/python/digital/constellation_map_generator.py
+++ b/gr-digital/python/digital/constellation_map_generator.py
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2013 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.
-#
+#
def constellation_map_generator(basis_cpoints, basis_symbols, k, pi):
'''
@@ -41,7 +41,9 @@ def constellation_map_generator(basis_cpoints, basis_symbols,
k, pi):
symbol_map[i] are the bits associated with
constellation_points[i]).
'''
- const_points, s = basis()
+ #const_points, s = basis()
+ const_points = basis_cpoints
+ s = basis_symbols
symbols = list()
for s_i in s:
tmp = 0
diff --git a/gr-digital/python/digital/psk_constellations.py
b/gr-digital/python/digital/psk_constellations.py
index ee62c33..3f28ca5 100755
--- a/gr-digital/python/digital/psk_constellations.py
+++ b/gr-digital/python/digital/psk_constellations.py
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2013 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 numpy
from constellation_map_generator import *
@@ -133,7 +133,7 @@ def psk_4_0x1_0_1():
'''
k = 0x1
pi = [0, 1]
- return constellation_map_generator(psk_4, k, pi)
+ return constellation_map_generator(psk_4()[0], psk_4()[1], k, pi)
psk_4_1 = psk_4_0x1_0_1
def psk_4_0x2_0_1():
@@ -144,7 +144,7 @@ def psk_4_0x2_0_1():
'''
k = 0x2
pi = [0, 1]
- return constellation_map_generator(psk_4, k, pi)
+ return constellation_map_generator(psk_4()[0], psk_4()[1], k, pi)
psk_4_2 = psk_4_0x2_0_1
def psk_4_0x3_0_1():
@@ -155,7 +155,7 @@ def psk_4_0x3_0_1():
'''
k = 0x3
pi = [0, 1]
- return constellation_map_generator(psk_4, k, pi)
+ return constellation_map_generator(psk_4()[0], psk_4()[1], k, pi)
psk_4_3 = psk_4_0x3_0_1
def psk_4_0x0_1_0():
@@ -166,7 +166,7 @@ def psk_4_0x0_1_0():
'''
k = 0x0
pi = [1, 0]
- return constellation_map_generator(psk_4, k, pi)
+ return constellation_map_generator(psk_4()[0], psk_4()[1], k, pi)
psk_4_4 = psk_4_0x0_1_0
def psk_4_0x1_1_0():
@@ -177,7 +177,7 @@ def psk_4_0x1_1_0():
'''
k = 0x1
pi = [1, 0]
- return constellation_map_generator(psk_4, k, pi)
+ return constellation_map_generator(psk_4()[0], psk_4()[1], k, pi)
psk_4_5 = psk_4_0x1_1_0
def psk_4_0x2_1_0():
@@ -188,7 +188,7 @@ def psk_4_0x2_1_0():
'''
k = 0x2
pi = [1, 0]
- return constellation_map_generator(psk_4, k, pi)
+ return constellation_map_generator(psk_4()[0], psk_4()[1], k, pi)
psk_4_6 = psk_4_0x2_1_0
def psk_4_0x3_1_0():
@@ -199,7 +199,7 @@ def psk_4_0x3_1_0():
'''
k = 0x3
pi = [1, 0]
- return constellation_map_generator(psk_4, k, pi)
+ return constellation_map_generator(psk_4()[0], psk_4()[1], k, pi)
psk_4_7 = psk_4_0x3_1_0
@@ -305,4 +305,3 @@ def sd_psk_4_0x3_1_0(x, Es=1):
dist = Es*numpy.sqrt(2)
return [-dist*x_re, -dist*x_im]
sd_psk_4_7 = sd_psk_4_0x3_1_0
-
diff --git a/gr-digital/python/digital/qam_constellations.py
b/gr-digital/python/digital/qam_constellations.py
index 4e8ee08..6f9f6bf 100755
--- a/gr-digital/python/digital/qam_constellations.py
+++ b/gr-digital/python/digital/qam_constellations.py
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2013 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 numpy
from constellation_map_generator import *
@@ -131,7 +131,7 @@ def qam_16_0x1_0_1_2_3():
'''
k = 0x1
pi = [0, 1, 2, 3]
- return constellation_map_generator(qam_16, k, pi)
+ return constellation_map_generator(qam_16()[0], qam_16()[1], k, pi)
qam_16_1 = qam_16_0x1_0_1_2_3
def qam_16_0x2_0_1_2_3():
@@ -146,7 +146,7 @@ def qam_16_0x2_0_1_2_3():
'''
k = 0x2
pi = [0, 1, 2, 3]
- return constellation_map_generator(qam_16, k, pi)
+ return constellation_map_generator(qam_16()[0], qam_16()[1], k, pi)
qam_16_2 = qam_16_0x2_0_1_2_3
def qam_16_0x3_0_1_2_3():
@@ -161,7 +161,7 @@ def qam_16_0x3_0_1_2_3():
'''
k = 0x3
pi = [0, 1, 2, 3]
- return constellation_map_generator(qam_16, k, pi)
+ return constellation_map_generator(qam_16()[0], qam_16()[1], k, pi)
qam_16_3 = qam_16_0x3_0_1_2_3
@@ -177,7 +177,7 @@ def qam_16_0x0_1_0_2_3():
'''
k = 0x0
pi = [1, 0, 2, 3]
- return constellation_map_generator(qam_16, k, pi)
+ return constellation_map_generator(qam_16()[0], qam_16()[1], k, pi)
qam_16_4 = qam_16_0x0_1_0_2_3
def qam_16_0x1_1_0_2_3():
@@ -192,7 +192,7 @@ def qam_16_0x1_1_0_2_3():
'''
k = 0x1
pi = [1, 0, 2, 3]
- return constellation_map_generator(qam_16, k, pi)
+ return constellation_map_generator(qam_16()[0], qam_16()[1], k, pi)
qam_16_5 = qam_16_0x1_1_0_2_3
def qam_16_0x2_1_0_2_3():
@@ -207,7 +207,7 @@ def qam_16_0x2_1_0_2_3():
'''
k = 0x2
pi = [1, 0, 2, 3]
- return constellation_map_generator(qam_16, k, pi)
+ return constellation_map_generator(qam_16()[0], qam_16()[1], k, pi)
qam_16_6 = qam_16_0x2_1_0_2_3
def qam_16_0x3_1_0_2_3():
@@ -222,7 +222,7 @@ def qam_16_0x3_1_0_2_3():
'''
k = 0x3
pi = [1, 0, 2, 3]
- return constellation_map_generator(qam_16, k, pi)
+ return constellation_map_generator(qam_16()[0], qam_16()[1], k, pi)
qam_16_7 = qam_16_0x3_1_0_2_3