mirror of
https://github.com/romanz/amodem.git
synced 2026-02-07 01:18:02 +08:00
sampling: use raised cosine window.
This commit is contained in:
@@ -14,7 +14,7 @@ class Interpolator(object):
|
||||
|
||||
N = resolution * width
|
||||
u = np.arange(-N, N, dtype=float)
|
||||
window = (1 + np.cos(0.5 * np.pi * u / N)) / 2.0 # (Hann window)
|
||||
window = np.cos(0.5 * np.pi * u / N) ** 2.0 # raised cosine
|
||||
|
||||
h = np.sinc(u / resolution) * window
|
||||
self.filt = []
|
||||
|
||||
Reference in New Issue
Block a user