Beispiel #1
0
 def BSman(self, fil_dict):
     self._get_params(fil_dict)
     self.N = round_odd(self.N) # enforce odd order
     self._save(fil_dict, sig.remez(self.N,[0, self.F_PB, self.F_SB,
         self.F_SB2, self.F_PB2, 0.5],[1, 0, 1],
         weight = [fil_dict['W_PB'],fil_dict['W_SB'], fil_dict['W_PB2']],
         Hz = 1, grid_density = self.grid_density))
Beispiel #2
0
 def BSman(self, fil_dict):
     self._get_params(fil_dict)
     self.N = round_odd(self.N)  # enforce odd order
     if not self._test_N():
         return -1
     self._save(fil_dict, sig.firwin(self.N, [fil_dict['F_C'], fil_dict['F_C2']],
                         window = self.firWindow, pass_zero=True, nyq = 0.5))
Beispiel #3
0
 def HPmin(self, fil_dict):
     self.get_params(fil_dict)
     (N, F, A, W) = remezord([self.F_SB, self.F_PB], [0, 1],
         [self.A_SB, self.A_PB], Hz = 1, alg = self.alg)
     fil_dict['F_C'] = (self.F_SB + self.F_PB)/2 # use average of calculated F_PB and F_SB
     self.N = round_odd(N)  # enforce odd order
     self.save(fil_dict, sig.firwin(self.N, fil_dict['F_C'], 
                 window = self.firWindow, pass_zero=False, nyq = 0.5))
Beispiel #4
0
 def BSmin(self, fil_dict):
     self._get_params(fil_dict)
     N = remezord([self.F_PB, self.F_SB, self.F_SB2, self.F_PB2], [1, 0, 1],
         [self.A_PB, self.A_SB, self.A_PB2], Hz = 1, alg = self.alg)[0]
     self.N = round_odd(N)  # enforce odd order
     fil_dict['F_C'] = (self.F_SB + self.F_PB)/2 # use average of calculated F_PB and F_SB
     fil_dict['F_C2'] = (self.F_SB2 + self.F_PB2)/2 # use average of calculated F_PB and F_SB
     self._save(fil_dict, sig.firwin(self.N, [fil_dict['F_C'], fil_dict['F_C2']],
                         window = self.firWindow, pass_zero=True, nyq = 0.5))
Beispiel #5
0
 def HPmin(self, fil_dict):
     self._get_params(fil_dict)
     N = self._firwin_ord([self.F_SB, self.F_PB], [0, 1],
                         [self.A_SB, self.A_PB], alg = self.alg)
     self.N = round_odd(N)  # enforce odd order
     if not self._test_N():
         return -1
     fil_dict['F_C'] = (self.F_SB + self.F_PB)/2 # use average of calculated F_PB and F_SB
     self._save(fil_dict, sig.firwin(self.N, fil_dict['F_C'], 
                 window = self.firWindow, pass_zero=False, nyq = 0.5))
Beispiel #6
0
 def BSmin(self, fil_dict):
     self._get_params(fil_dict)
     (N, F, A, W) = remezord([self.F_PB, self.F_SB,
                             self.F_SB2, self.F_PB2], [1, 0, 1],
         [self.A_PB, self.A_SB, self.A_PB2], Hz = 1, alg = self.alg)
     self.N = round_odd(N)  # enforce odd order
     fil_dict['W_PB']  = W[0]
     fil_dict['W_SB']  = W[1]
     fil_dict['W_PB2'] = W[2]
     self._save(fil_dict, sig.remez(self.N,F,[1, 0, 1], weight = W, Hz = 1,
                                   grid_density = self.grid_density))
Beispiel #7
0
 def BSman(self, fil_dict):
     self.get_params(fil_dict)
     self.N = round_odd(self.N)  # enforce odd order
     self.save(fil_dict, sig.firwin(self.N, [fil_dict['F_C'], fil_dict['F_C2']],
                         window = self.firWindow, pass_zero=True, nyq = 0.5))
Beispiel #8
0
 def HPman(self, fil_dict):
     self._get_params(fil_dict)
     self.N = round_odd(self.N)  # enforce odd order
     self._save(fil_dict, sig.firwin(self.N, fil_dict['F_C'], 
         window = self.firWindow, pass_zero=False, nyq = 0.5))
Beispiel #9
0
 def HPman(self, fil_dict):
     self._get_params(fil_dict)
     self.N = round_odd(self.N)  # enforce odd order
     self._save(fil_dict, sig.firwin(self.N, fil_dict['F_C'], 
         window = self.firWindow, pass_zero=False, nyq = 0.5))