Пример #1
0
 def test_001_viterbi(self):
     """
     Runs some coding/decoding tests with a few different FSM
     specs.
     """
     for name, args in fsm_args.items():
         constellation = constells[args[2]]
         fsms = trellis.fsm(*args)
         noise = 0.1
         tb = trellis_tb(constellation, fsms, noise)
         tb.run()
         # Make sure all packets succesfully transmitted.
         self.assertEqual(tb.dst.ntotal(), tb.dst.nright())
Пример #2
0
 def test_001_viterbi(self):
     """
     Runs some coding/decoding tests with a few different FSM
     specs.
     """
     for name, args in fsm_args.items():
         constellation = constells[args[2]]
         fsms = trellis.fsm(*args)
         noise = 0.1
         tb = trellis_tb(constellation, fsms, noise)
         tb.run()
         # Make sure all packets succesfully transmitted.
         self.assertEqual(tb.dst.ntotal(), tb.dst.nright())
Пример #3
0
 def test_004_fsm(self):
     """ Test to make sure fsm works with a single state fsm."""
     # Just checking that it initializes properly.
     f = trellis.fsm(*fsm_args["rep2"])
Пример #4
0
 def test_002_fsm(self):
     f = trellis.fsm(*fsm_args["awgn1o2_4"])
     g = trellis.fsm(f)
     self.assertEqual((g.I(), g.S(), g.O(), g.NS(), g.OS()), (f.I(), f.S(), f.O(), f.NS(), f.OS()))
Пример #5
0
 def test_001_fsm(self):
     f = trellis.fsm(*fsm_args["awgn1o2_4"])
     self.assertEqual(fsm_args["awgn1o2_4"], (f.I(), f.S(), f.O(), f.NS(), f.OS()))
Пример #6
0
 def test_004_fsm(self):
     """ Test to make sure fsm works with a single state fsm."""
     # Just checking that it initializes properly.
     f = trellis.fsm(*fsm_args["rep2"])
Пример #7
0
 def test_002_fsm(self):
     f = trellis.fsm(*fsm_args["awgn1o2_4"])
     g = trellis.fsm(f)
     self.assertEqual((g.I(), g.S(), g.O(), g.NS(), g.OS()),
                      (f.I(), f.S(), f.O(), f.NS(), f.OS()))
Пример #8
0
 def test_001_fsm(self):
     f = trellis.fsm(*fsm_args["awgn1o2_4"])
     self.assertEqual(fsm_args["awgn1o2_4"],
                      (f.I(), f.S(), f.O(), f.NS(), f.OS()))