From 9358f7ba39d2d0f07cac842f22d1dade41aed58e Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 9 Aug 2014 22:00:08 +0300 Subject: [PATCH] sampling: N should a variable --- amodem/sampling.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/amodem/sampling.py b/amodem/sampling.py index ec10a3a..a46165c 100644 --- a/amodem/sampling.py +++ b/amodem/sampling.py @@ -10,9 +10,9 @@ class Interpolator(object): def __init__(self, resolution=10000, width=128): self.width = width self.resolution = resolution - self.N = resolution * width - u = np.arange(-self.N, self.N, dtype=float) - window = (1 + np.cos(0.5 * np.pi * u / self.N)) / 2.0 + N = resolution * width + u = np.arange(-N, N, dtype=float) + window = (1 + np.cos(0.5 * np.pi * u / N)) / 2.0 h = np.sinc(u / resolution) * window self.filt = [] for index in range(resolution): # split into multiphase filters