check for saturation during demodulation.

This commit is contained in:
Roman Zeyde
2014-08-28 17:43:14 +03:00
parent 08102a043c
commit bc13d5a944
3 changed files with 14 additions and 11 deletions

View File

@@ -54,9 +54,9 @@ def test_dumps_loads():
def test_saturation():
x = np.array([1, -1, 1, -1]) * 1.01
x = np.array([1, -1, 1, -1]) * 1e10
try:
common.check_saturation(x)
assert False
except common.SaturationError as e:
assert e.args == (1.01,)
assert e.args == (max(x),)