Skip to content

Commit

Permalink
Merge pull request #33 from veeresht/docstring_update
Browse files Browse the repository at this point in the history
Corrected docstring format. Added THANKS file.
  • Loading branch information
BastienTr committed May 23, 2019
2 parents b6969c2 + 58c62ac commit bc626a1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
11 changes: 11 additions & 0 deletions THANKS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Please add names as needed so that we can keep up with all the contributors.

Veeresh Taranalli for initial creation and contribution of CommPy.
Bastien Trotobas for adding SISO and MIMO channel models with Rayleigh or rician fading, bugfixes, maintenance.
Vladimir Fadeev for bugfixes, addition of convolutional code puncturing.
Rey Tucker for python3 compatibility fixes.
Dat Nguyen for type check fix for AWGN channel model.
Mateusz Michalski for bugfix in AWGN channel model.
Ravi Sharan for bugfix in PSK modem constellation mapping.
@hoo89 for bugfix in AWGN channel model.
@mborgerding for docstring update.
31 changes: 19 additions & 12 deletions commpy/channelcoding/convcode.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Authors: Veeresh Taranalli <veeresht@gmail.com>
# Authors: Veeresh Taranalli <veeresht@gmail.com>
# License: BSD 3-Clause

""" Algorithms for Convolutional Codes """
Expand Down Expand Up @@ -545,16 +545,19 @@ def viterbi_decode(coded_bits, trellis, tb_depth=None, decoding_type='hard'):
return decoded_bits[0:len(decoded_bits)-tb_depth-1]

def puncturing(message, punct_vec):
'''
"""
Applying of the punctured procedure.
Parameters
----------
message: input message {0,1}
punct_vec: puncturing vector {0,1}
message : 1D ndarray
Input message {0,1} bit array.
punct_vec : 1D ndarray
Puncturing vector {0,1} bit array.
Returns
-------
punctured: output punctured vector {0,1}
'''
punctured : 1D ndarray
Output punctured vector {0,1} bit array.
"""
shift = 0
N = len(punct_vec)
punctured = []
Expand All @@ -566,17 +569,21 @@ def puncturing(message, punct_vec):
return np.array(punctured)

def depuncturing(punctured, punct_vec, shouldbe):
'''
"""
Applying of the inserting zeros procedure.
Parameters
----------
punctured: input punctured message {0,1}
punct_vec: puncturing vector {0,1}
shouldbe: length of the initial message (before puncturing)
punctured : 1D ndarray
Input punctured message {0,1} bit array.
punct_vec : 1D ndarray
Puncturing vector {0,1} bit array.
shouldbe : int
Length of the initial message (before puncturing).
Returns
-------
depunctured: output vector {0,1}
'''
depunctured : 1D ndarray
Output vector {0,1} bit array.
"""
shift = 0
shift2 = 0
N = len(punct_vec)
Expand Down

0 comments on commit bc626a1

Please sign in to comment.