Changeset 13327 for fact/tools/pyscripts/pyfact/fir_filter.py
- Timestamp:
- 04/07/12 10:12:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/pyfact/fir_filter.py
r13232 r13327 14 14 15 15 def __init__(self, b, a, name = 'general FIR filter'): 16 """ initialize filter coefficients 17 16 """ 17 See `scipy.signal.lfilter() <http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.lfilter.html#scipy.signal.lfilter>`_ 18 *b* The numerator coefficient vector (1D) 19 20 *a* The denominator coefficient vector (1D). 21 22 If a[0] is not 1, then both a and b are normalized by a[0]. 18 23 """ 19 24 self.a = a … … 22 27 23 28 def __call__(self, data): 29 """ Apply generic FIR filter to *data* using scipy.signal.lfilter() 30 31 *data* 1D or 2D numpy array 32 """ 24 33 length = max(len(self.a),len(self.b))-1 25 34 if length > 0:
Note:
See TracChangeset
for help on using the changeset viewer.