mirror of
https://github.com/romanz/amodem.git
synced 2026-03-21 09:59:33 +08:00
recv: plot prefix also as a function of time
This commit is contained in:
@@ -97,9 +97,13 @@ class Receiver(object):
|
||||
S = common.take(symbols, len(train.prefix)).squeeze() * gain
|
||||
sliced = np.round(S)
|
||||
self.pylab.figure()
|
||||
self.pylab.subplot(121)
|
||||
self._constellation(S, sliced, 'Prefix')
|
||||
|
||||
bits = np.array(np.abs(sliced), dtype=int)
|
||||
self.pylab.subplot(122)
|
||||
self.pylab.plot(np.abs(S))
|
||||
self.pylab.plot(train.prefix)
|
||||
if any(bits != train.prefix):
|
||||
raise ValueError('Incorrect prefix')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user