Skip to content

Commit e43d246

Browse files
authored
Merge pull request #2 from veeresht/master
Update
2 parents b915f5b + bc626a1 commit e43d246

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

THANKS.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Please add names as needed so that we can keep up with all the contributors.
2+
3+
Veeresh Taranalli for initial creation and contribution of CommPy.
4+
Bastien Trotobas for adding SISO and MIMO channel models with Rayleigh or rician fading, bugfixes, maintenance.
5+
Vladimir Fadeev for bugfixes, addition of convolutional code puncturing.
6+
Rey Tucker for python3 compatibility fixes.
7+
Dat Nguyen for type check fix for AWGN channel model.
8+
Mateusz Michalski for bugfix in AWGN channel model.
9+
Ravi Sharan for bugfix in PSK modem constellation mapping.
10+
@hoo89 for bugfix in AWGN channel model.
11+
@mborgerding for docstring update.

commpy/channelcoding/convcode.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Authors: Veeresh Taranalli <veeresht@gmail.com>
1+
# Authors: Veeresh Taranalli <veeresht@gmail.com>
22
# License: BSD 3-Clause
33

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

547547
def puncturing(message, punct_vec):
548-
'''
548+
"""
549549
Applying of the punctured procedure.
550550
Parameters
551551
----------
552-
message: input message {0,1}
553-
punct_vec: puncturing vector {0,1}
552+
message : 1D ndarray
553+
Input message {0,1} bit array.
554+
punct_vec : 1D ndarray
555+
Puncturing vector {0,1} bit array.
554556
Returns
555557
-------
556-
punctured: output punctured vector {0,1}
557-
'''
558+
punctured : 1D ndarray
559+
Output punctured vector {0,1} bit array.
560+
"""
558561
shift = 0
559562
N = len(punct_vec)
560563
punctured = []
@@ -566,17 +569,21 @@ def puncturing(message, punct_vec):
566569
return np.array(punctured)
567570

568571
def depuncturing(punctured, punct_vec, shouldbe):
569-
'''
572+
"""
570573
Applying of the inserting zeros procedure.
571574
Parameters
572575
----------
573-
punctured: input punctured message {0,1}
574-
punct_vec: puncturing vector {0,1}
575-
shouldbe: length of the initial message (before puncturing)
576+
punctured : 1D ndarray
577+
Input punctured message {0,1} bit array.
578+
punct_vec : 1D ndarray
579+
Puncturing vector {0,1} bit array.
580+
shouldbe : int
581+
Length of the initial message (before puncturing).
576582
Returns
577583
-------
578-
depunctured: output vector {0,1}
579-
'''
584+
depunctured : 1D ndarray
585+
Output vector {0,1} bit array.
586+
"""
580587
shift = 0
581588
shift2 = 0
582589
N = len(punct_vec)

0 commit comments

Comments
 (0)