Skip to content

Commit

Permalink
Added test cases for unquantized input Viterbi decoding.
Browse files Browse the repository at this point in the history
  • Loading branch information
veeresht committed Apr 8, 2015
1 parent 76142fc commit b998b01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Binary file added .coverage
Binary file not shown.
10 changes: 10 additions & 0 deletions commpy/channelcoding/tests/test_convcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ def test_conv_encode_viterbi_decode(self):
decoded_bits = viterbi_decode(coded_bits.astype(float), self.trellis_1, 15)
assert_array_equal(decoded_bits[:-2], msg)

coded_bits = conv_encode(msg, self.trellis_1)
coded_syms = 2.0*coded_bits - 1
decoded_bits = viterbi_decode(coded_syms, self.trellis_1, 15, 'unquantized')
assert_array_equal(decoded_bits[:-2], msg)

coded_bits = conv_encode(msg, self.trellis_2)
decoded_bits = viterbi_decode(coded_bits.astype(float), self.trellis_2, 15)
assert_array_equal(decoded_bits[:-2], msg)

coded_bits = conv_encode(msg, self.trellis_2)
coded_syms = 2.0*coded_bits - 1
decoded_bits = viterbi_decode(coded_syms, self.trellis_2, 15, 'unquantized')
assert_array_equal(decoded_bits[:-2], msg)

0 comments on commit b998b01

Please sign in to comment.