refactor sigproc

This commit is contained in:
Roman Zeyde
2014-07-05 11:23:45 +03:00
parent c001650bbf
commit db5908d63f

View File

@@ -47,10 +47,9 @@ class QAM(object):
yield s
def decode(self, symbols):
keys = np.array(self._dec.keys())
for s in symbols:
index = np.argmin(np.abs(s - keys))
yield self._dec[ keys[index] ]
index = np.argmin(np.abs(s - self.points))
yield self._dec[ self.points[index] ]
modulator = QAM(bits_per_symbol=2, radii=[1.0])