summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Bauer <markb5@illinois.edu>2021-06-09 15:39:21 -0400
committermormj <34754695+mormj@users.noreply.github.com>2021-06-16 06:38:49 -0400
commitcdf17740c6b9606e41acb5d5a9a95b2ee36931b2 (patch)
tree8be02f7e983c14088137c341ebb0958f7ae9f393
parent222d95124bdc86d0bcc8c3498ea731ce03ad7cf8 (diff)
replaced star imports with explicit imports
Signed-off-by: Mark Bauer <markb5@illinois.edu>
-rw-r--r--gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py8
-rw-r--r--gr-fec/python/fec/extended_decoder.py2
-rw-r--r--gr-fec/python/fec/extended_tagged_decoder.py2
-rw-r--r--gr-fec/python/fec/polar/channel_construction.py2
-rw-r--r--gr-fec/python/fec/polar/channel_construction_awgn.py4
-rw-r--r--gr-fec/python/fec/polar/common.py2
-rw-r--r--gr-fec/python/fec/polar/testbed.py3
-rwxr-xr-xgr-utils/plot_tools/gr_plot_const12
-rwxr-xr-xgr-utils/plot_tools/gr_plot_iq3
9 files changed, 29 insertions, 9 deletions
diff --git a/gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py b/gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py
index 4a54d9d249..53e9fa6b29 100644
--- a/gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py
+++ b/gr-fec/python/fec/LDPC/Generate_LDPC_matrix.py
@@ -9,7 +9,13 @@
#
-from .Generate_LDPC_matrix_functions import *
+from .Generate_LDPC_matrix_functions import (
+ LDPC_matrix,
+ get_best_matrix,
+ get_full_rank_H_matrix,
+ linalg,
+ write_alist_file,
+)
# This is an example of how to generate a parity check matrix for
# use with the LDPC Richardson Urbanke encoder. A significant amount
diff --git a/gr-fec/python/fec/extended_decoder.py b/gr-fec/python/fec/extended_decoder.py
index 0f052ce12c..a71759c989 100644
--- a/gr-fec/python/fec/extended_decoder.py
+++ b/gr-fec/python/fec/extended_decoder.py
@@ -13,7 +13,7 @@ from gnuradio import gr, blocks, digital
from . import fec_python as fec
-from .bitflip import *
+from .bitflip import read_bitlist
from .threaded_decoder import threaded_decoder
from .capillary_threaded_decoder import capillary_threaded_decoder
diff --git a/gr-fec/python/fec/extended_tagged_decoder.py b/gr-fec/python/fec/extended_tagged_decoder.py
index f46bcb521e..95bffc453a 100644
--- a/gr-fec/python/fec/extended_tagged_decoder.py
+++ b/gr-fec/python/fec/extended_tagged_decoder.py
@@ -13,7 +13,7 @@ from gnuradio import gr, blocks, digital
from . import fec_python as fec
-from .bitflip import *
+from .bitflip import read_bitlist
class extended_tagged_decoder(gr.hier_block2):
diff --git a/gr-fec/python/fec/polar/channel_construction.py b/gr-fec/python/fec/polar/channel_construction.py
index 76b26c43d1..629a7e3cfd 100644
--- a/gr-fec/python/fec/polar/channel_construction.py
+++ b/gr-fec/python/fec/polar/channel_construction.py
@@ -15,7 +15,7 @@ foundational paper for polar codes.
from .channel_construction_bec import calculate_bec_channel_capacities
from .channel_construction_bec import design_snr_to_bec_eta
from .channel_construction_bec import bhattacharyya_bounds
-from .helper_functions import *
+import numpy as np
try:
from .channel_construction_awgn import tal_vardy_tpm_algorithm
except ImportError:
diff --git a/gr-fec/python/fec/polar/channel_construction_awgn.py b/gr-fec/python/fec/polar/channel_construction_awgn.py
index bd9cb0f345..8a81c68076 100644
--- a/gr-fec/python/fec/polar/channel_construction_awgn.py
+++ b/gr-fec/python/fec/polar/channel_construction_awgn.py
@@ -18,7 +18,9 @@ for an overview of different approaches
from scipy.optimize import fsolve
from scipy.special import erfc
-from .helper_functions import *
+import numpy as np
+from .helper_functions import (bhattacharyya_parameter, bit_reverse_vector,
+ power_of_2_int, show_progress_bar)
from .channel_construction_bec import bhattacharyya_bounds
diff --git a/gr-fec/python/fec/polar/common.py b/gr-fec/python/fec/polar/common.py
index 9441558e73..3c3410bf85 100644
--- a/gr-fec/python/fec/polar/common.py
+++ b/gr-fec/python/fec/polar/common.py
@@ -9,7 +9,7 @@
import numpy as np
-from .helper_functions import *
+from .helper_functions import bit_reverse_vector, is_power_of_two
'''
PolarCommon holds value checks and common initializer code for both Encoder and Decoder.
diff --git a/gr-fec/python/fec/polar/testbed.py b/gr-fec/python/fec/polar/testbed.py
index 3a4471ce3c..b2350f9ef6 100644
--- a/gr-fec/python/fec/polar/testbed.py
+++ b/gr-fec/python/fec/polar/testbed.py
@@ -11,7 +11,8 @@
from .encoder import PolarEncoder
from .decoder import PolarDecoder
from . import channel_construction as cc
-from .helper_functions import *
+import numpy as np
+from .helper_functions import power_of_2_int
import matplotlib.pyplot as plt
diff --git a/gr-utils/plot_tools/gr_plot_const b/gr-utils/plot_tools/gr_plot_const
index be525b473a..463baefd76 100755
--- a/gr-utils/plot_tools/gr_plot_const
+++ b/gr-utils/plot_tools/gr_plot_const
@@ -11,7 +11,17 @@
import numpy
try:
- from pylab import *
+ from pylab import (
+ Button,
+ ceil,
+ connect,
+ draw,
+ figtext,
+ figure,
+ get_current_fig_manager,
+ rcParams,
+ searchsorted,
+ show)
from matplotlib.font_manager import fontManager, FontProperties
except ImportError:
print("Please install Python Matplotlib (http://matplotlib.sourceforge.net/) and \
diff --git a/gr-utils/plot_tools/gr_plot_iq b/gr-utils/plot_tools/gr_plot_iq
index 846f62b802..924109e30d 100755
--- a/gr-utils/plot_tools/gr_plot_iq
+++ b/gr-utils/plot_tools/gr_plot_iq
@@ -11,7 +11,8 @@
import numpy
try:
- from pylab import *
+ from pylab import (Button, connect, draw, figtext, figure,
+ get_current_fig_manager, plot, rcParams, show)
except ImportError:
print("Please install Python Matplotlib (http://matplotlib.sourceforge.net/) and \
Python TkInter https://wiki.python.org/moin/TkInter to run this script")