[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 09/25: polar: fixed bugs in init code
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 09/25: polar: fixed bugs in init code |
Date: |
Wed, 23 Sep 2015 14:51:37 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 48e1ab019856d78f4fa7354f2edb0b8641ebc13a
Author: Johannes Demel <address@hidden>
Date: Fri Sep 18 16:02:38 2015 +0200
polar: fixed bugs in init code
---
gr-fec/grc/polar_code_configurator.xml | 17 +++++++----------
gr-fec/python/fec/polar/__init__.py | 3 +++
gr-fec/python/fec/polar/channel_construction.py | 2 +-
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/gr-fec/grc/polar_code_configurator.xml
b/gr-fec/grc/polar_code_configurator.xml
index cfde368..dd28e49 100644
--- a/gr-fec/grc/polar_code_configurator.xml
+++ b/gr-fec/grc/polar_code_configurator.xml
@@ -3,25 +3,22 @@
<name>POLAR code Configurator</name>
<key>variable_polar_code_configurator</key>
<import>from gnuradio.fec import polar</import>
- <var_make>self.$(id) = $(id) = polar.load_frozen_bits_info(False,
$channel.c, $block_size, $num_info_bits, $design_snr, $mu)</var_make>
- <var_value>polar.load_frozen_bits_info(True, $channel.c, $block_size,
$num_info_bits, $design_snr, $mu)</var_value>
+ <var_make>self.$(id) = $(id) = polar.load_frozen_bits_info(False, $channel,
$block_size, $num_info_bits, $design_snr, $mu)</var_make>
+ <var_value>polar.load_frozen_bits_info(True, $channel, $block_size,
$num_info_bits, $design_snr, $mu)</var_value>
<make></make>
<param>
<name>Channel</name>
<key>channel</key>
- <type>enum</type>
+ <value>polar.CHANNEL_TYPE_BEC</value>
+ <type>string</type>
<option>
<name>BEC</name>
- <key>bec</key>
- <opt>c:'BEC'</opt>
- <opt>h:True</opt>
+ <key>polar.CHANNEL_TYPE_BEC</key>
</option>
<option>
<name>BSC</name>
- <key>bsc</key>
- <opt>c:'BSC'</opt>
- <opt>h:False</opt>
+ <key>polar.CHANNEL_TYPE_BSC</key>
</option>
</param>
@@ -49,6 +46,6 @@
<key>mu</key>
<value>16</value>
<type>int</type>
- <hide>#if str($channel.h) == 'True' then 'all' else 'none'#</hide>
+ <hide>#if 'BEC' in $getVar('channel') then 'all' else 'none' #</hide>
</param>
</block>
\ No newline at end of file
diff --git a/gr-fec/python/fec/polar/__init__.py
b/gr-fec/python/fec/polar/__init__.py
index 4a9cc75..0b9c264 100644
--- a/gr-fec/python/fec/polar/__init__.py
+++ b/gr-fec/python/fec/polar/__init__.py
@@ -26,6 +26,9 @@ from channel_construction_bec import bhattacharyya_bounds
from helper_functions import is_power_of_two
+CHANNEL_TYPE_BSC = 'BSC'
+CHANNEL_TYPE_BEC = 'BEC'
+
def get_z_params(is_prototype, channel, block_size, design_snr, mu):
print('POLAR code channel construction called with parameters channel={0},
blocksize={1}, design SNR={2}, mu={3}'.format(channel, block_size, design_snr,
mu))
if not (channel == 'BSC' or channel == 'BEC'):
diff --git a/gr-fec/python/fec/polar/channel_construction.py
b/gr-fec/python/fec/polar/channel_construction.py
index bf3ff92..a7f048c 100644
--- a/gr-fec/python/fec/polar/channel_construction.py
+++ b/gr-fec/python/fec/polar/channel_construction.py
@@ -49,7 +49,7 @@ def get_frozen_bit_indices_from_z_parameters(z_params,
nfrozen):
while indexes.size < nfrozen:
index = np.argmax(z_params)
indexes = np.append(indexes, index)
- z_params[index] = 0.0
+ z_params[index] = -1.0
return np.sort(indexes)
- [Commit-gnuradio] [gnuradio] branch master updated (aae6445 -> 45faa98), git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 08/25: polar: updated VOLK pointer to volk/volk/master with polar kernels merged, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 17/25: fec: polar: renaming GRC file names to be consistent with other codes and variable names., git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 20/25: fec: polar: Installing more FEC examples., git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 09/25: polar: fixed bugs in init code,
git <=
- [Commit-gnuradio] [gnuradio] 12/25: Fix the VOLKized fft_vcc_fftw and QA code, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 23/25: volk: update submodule to latest, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 11/25: grc: defer check for gtk init until after arg parsing, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 18/25: Merge branch 'socis/master' into polar, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 22/25: Merge remote-tracking branch 'geiger/volkize_fft_fix', git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 10/25: polar: rebased and fixed branch for merge again., git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 19/25: polar: rearranged polar_code_example flowgraph, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 21/25: Merge branch 'maint', git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 05/25: polar: VOLK kernel integration, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 24/25: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2015/09/23