MCPcopy Create free account
hub / github.com/PyTTaMaster/PyTTa / OctFilter

Class OctFilter

pytta/classes/filter.py:38–165  ·  view source on GitHub ↗

Octave filter.

Source from the content-addressed store, hash-verified

36
37
38class OctFilter(FilterBase):
39 """
40 Octave filter.
41 """
42 def __init__(self,
43 order: int = None,
44 nthOct: int = None,
45 samplingRate: int = None,
46 minFreq: float = None,
47 maxFreq: float = None,
48 refFreq: float = None,
49 base: int = None) -> None:
50 """
51
52 Parameters
53 ----------
54 order : int, optional
55 DESCRIPTION. The default is None.
56 nthOct : int, optional
57 DESCRIPTION. The default is None.
58 samplingRate : int, optional
59 DESCRIPTION. The default is None.
60 minFreq : float, optional
61 DESCRIPTION. The default is None.
62 maxFreq : float, optional
63 DESCRIPTION. The default is None.
64 refFreq : float, optional
65 DESCRIPTION. The default is None.
66 base : int, optional
67 DESCRIPTION. The default is None.
68
69 Returns
70 -------
71 None
72 DESCRIPTION.
73
74 """
75 FilterBase.__init__(self, order, samplingRate)
76 self.nthOct = nthOct
77 self.minFreq = minFreq
78 self.minBand = freq_to_band(minFreq, nthOct, refFreq, base)
79 self.maxFreq = maxFreq
80 self.maxBand = freq_to_band(maxFreq, nthOct, refFreq, base)
81 self.refFreq = refFreq
82 self.base = base
83 self.sos = self.get_sos_filters()
84 return
85
86 def __enter__(self):
87 return self
88
89 def __exit__(self, kind, value, traceback):
90 if traceback is None:
91 return
92 else:
93 raise value
94
95 def __design_sos_butter(self,

Callers 3

_filterFunction · 0.90
SPLFunction · 0.90
_filterFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected