mirror of
https://github.com/romanz/amodem.git
synced 2026-03-20 09:29:31 +08:00
optimize sampler to apply demuxing at symbols rate
This commit is contained in:
@@ -4,8 +4,8 @@ import numpy as np
|
||||
|
||||
def test_resample():
|
||||
x = np.arange(300)
|
||||
s = sampling.Sampler(x)
|
||||
y = np.array(list(s))
|
||||
s = sampling.Sampler(x, interp=sampling.Interpolator())
|
||||
y = s.take(len(x) - s.interp.width - 1)
|
||||
|
||||
err = x[1:len(y)+1] - y
|
||||
assert np.max(np.abs(err)) < 1e-10
|
||||
|
||||
Reference in New Issue
Block a user