[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/01: fec: conditionalize use of matplotli
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/01: fec: conditionalize use of matplotlib in polar code helper functions. |
Date: |
Tue, 20 Oct 2015 22:38:14 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit e0a70a9257290dbf43c2936acf6ccbb4393295cb
Author: Tom Rondeau <address@hidden>
Date: Tue Oct 20 18:30:35 2015 -0400
fec: conditionalize use of matplotlib in polar code helper functions.
Make it so that we don't require matplotlib just to run QA tests.
---
gr-fec/python/fec/polar/channel_construction.py | 12 ++++++------
gr-fec/python/fec/polar/channel_construction_bsc.py | 8 +++++---
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/gr-fec/python/fec/polar/channel_construction.py
b/gr-fec/python/fec/polar/channel_construction.py
index a7f048c..477e1df 100644
--- a/gr-fec/python/fec/polar/channel_construction.py
+++ b/gr-fec/python/fec/polar/channel_construction.py
@@ -29,7 +29,6 @@ from channel_construction_bec import design_snr_to_bec_eta
from channel_construction_bec import bhattacharyya_bounds
from channel_construction_bsc import tal_vardy_tpm_algorithm
from helper_functions import *
-import matplotlib.pyplot as plt
Z_PARAM_FIRST_HEADER_LINE = "Bhattacharyya parameters (Z-parameters) for a
polar code"
@@ -128,12 +127,13 @@ def main():
z_params = load_z_parameters(m, design_snr, mu)
z_bounds = bhattacharyya_bounds(design_snr, m)
print(z_params[-10:])
- plt.plot(z_params)
- plt.plot(z_bounds)
- plt.show()
+
+ if 0:
+ import matplotlib.pyplot as plt
+ plt.plot(z_params)
+ plt.plot(z_bounds)
+ plt.show()
if __name__ == '__main__':
main()
-
-
diff --git a/gr-fec/python/fec/polar/channel_construction_bsc.py
b/gr-fec/python/fec/polar/channel_construction_bsc.py
index e16813f..77057a7 100755
--- a/gr-fec/python/fec/polar/channel_construction_bsc.py
+++ b/gr-fec/python/fec/polar/channel_construction_bsc.py
@@ -31,7 +31,6 @@ for an overview of different approaches
from scipy.optimize import fsolve
from scipy.special import erfc
from helper_functions import *
-import matplotlib.pyplot as plt
from channel_construction_bec import bhattacharyya_bounds
@@ -272,8 +271,11 @@ def main():
z_params = tal_vardy_tpm_algorithm(m, design_snr, mu)
print(z_params)
- plt.plot(z_params)
- plt.show()
+
+ if 0:
+ import matplotlib.pyplot as plt
+ plt.plot(z_params)
+ plt.show()
if __name__ == '__main__':