sampling: N should a variable

This commit is contained in:
Roman Zeyde
2014-08-09 22:00:08 +03:00
parent 3c6324d064
commit 9358f7ba39

View File

@@ -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