You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't need a whole filter design suite, but at least a function that gives a reasonably-well designed filter for what we tend to use it for in this library would be great.
We can still use firwin() but we need to update the function calls. It uses a filter length approximation that generates filters that are too long and assumes a static transition bandwidth of 1% which is quite narrow and impractical for real world systems.
Cataloging firwin() calls that need:
from transforms/signal_processing/functional.py:
70 num_taps = int(2np.ceil(502np.pi/new_rate/.125/22)) # fred harris rule of thumb * 2
71 taps = signal.firwin(
72 num_taps,
73 new_rate0.98,
74 width=new_rate * .02,
75 window=signal.get_window("blackman", num_taps),
76 scale=True
77 )
from transforms/signal_processing/sp_functional.py:
70 num_taps = int(2np.ceil(502np.pi/new_rate/.125/22)) # fred harris rule of thumb * 2
71 taps = signal.firwin(
72 num_taps,
73 new_rate0.98,
74 width=new_rate * .02,
75 window=signal.get_window("blackman", num_taps),
76 scale=True
77 )
from transforms/system_impairment/si_functional.py:
115 num_taps = int(2np.ceil(502*np.pi/(1/up)/.125/22)) # fred harris rule of thumb * 2
116 taps = sp.firwin(
117 num_taps,
118 (1/up),
119 width=(1/up) * .02,
120 window=sp.get_window("blackman", num_taps),
121 scale=True
122 )
130 num_taps = int(2 * np.ceil(50 * 2 * np.pi / (1/up) / .125 / 22)) # fred harris rule-of-thumb * 2
131 taps = sp.firwin(
132 num_taps,
133 1 / up,
134 width=(1/up) * .02,
135 window=sp.get_window("blackman", num_taps),
136 scale=True
137 )
354 taps = sp.firwin(
355 num_taps,
356 bandwidth,
357 width=bandwidth * .02,
358 window=sp.get_window("blackman", num_taps),
359 scale=True
360 )
Similar function calls in transforms/system_impairment/functional.py
The text was updated successfully, but these errors were encountered: