Lines Matching refs:n
33 self.n = ((T.DT_MS[dt] * 128) / 10).astype(int)
37 self.u = np.zeros(self.n + 2)
38 self.y = np.zeros(self.n + self.d + history)
45 n = self.n
53 if len(self.y) > 2*n + d:
54 self.y[n+d:-n] = self.y[d+2*n:]
55 if len(self.y) > n + d:
56 self.y[-n:] = self.y[:n]
57 self.y[:d] = self.y[n:d+n]
68 for i in range(n):
82 self.y[d:d+n] = b[0] * u[2:] + b[1] * u[1:-1] + b[2] * u[:-2]
83 for i in range(n):
91 def __init__(self, n, history = 0): argument
93 self.x = np.zeros(n + 5)
94 self.n = n // 2
96 self.y = np.zeros(self.n + history)
100 n = self.n
105 self.x[3:] = x[:2*n+2]
108 if len(self.y) > 2*n:
109 self.y[n:-n] = self.y[2*n:]
110 if len(self.y) > n:
111 self.y[-n:] = self.y[:n]
118 self.y[:n] = [ np.dot(x[2*i:2*i+5], h) for i in range(self.n) ]
147 self.resampler_12k8.n, history = 114)
163 def correlate(self, x, n, k0, k1): argument
165 return [ np.dot(x[:n], np.take(x, np.arange(n) - k)) \
168 def norm_corr(self, x, n, k): argument
170 u = x[:n]
171 v = np.take(x, np.arange(n) - k)
184 n = self.resampler_6k4.n
186 r = self.correlate(x, n, 17, 114)
194 nc = [ self.norm_corr(x, n, t[i]) for i in range(2) ]
206 n = self.resampler_12k8.n
210 r = self.correlate(x, n, k0-4, k1+4)
243 for i in range(n) ]
245 for i in range(-e, n-e) ]
460 y_c[:-r.n] = y_c[r.n:]
463 ok = ok and np.amax(np.abs(y_c[-r.d-r.n:] - y[:r.d+r.n]/2)) < 4
473 n = [ 96, 128 ][dt]
474 k = [ 44, 24 ][dt] + n
486 y[:-n] = y[n:]