mcfilter Package¶
mcfilter
Package¶
implementation of mc filter application with time domain FIR filters
There is a general implementation suitable for larger chunks of data and batch mode filtering mcfilter. Also there is a filtering strategy that implements a history item for the part of the signal that could not be filtered in case of chunked continuous data, so that the filter is applied as far as possible and the relevant part of the signal data thas is needed to process the next chunk is passed on as the so called history item.
Implementations are given in Python and alternatively as in Cython. On import the Cython function is being tried to load, on failure the python version is loaded as a fallback.
-
mcfilter
(mc_data, mc_filt)[source]¶ filter a multi-channeled signal with a multi-channeled filter
This is the Python implementation for batch mode filtering. The signal will be zeros on both ends to overcome filter artifacts.
Parameters: - mc_data (ndarray) – signal data [data_samples, channels]
- mc_filt (ndarray) – FIR filter [filter_samples, channels]
Return type: ndarray
Returns: filtered signal [data_samples]
-
mcfilter_hist
(mc_data, mc_filt, mc_hist=None)[source]¶ filter a multichanneled signal with a multichanneled fir filter
This is the Python implementation for online mode filtering with a chunk-wise history item, holding the last samples of tha preceding chunk.
Parameters: - mc_data (ndarray) – signal data [data_samples, channels]
- mc_filt (ndarray) – FIR filter [filter_samples, channels]
- mc_hist – history [hist_samples, channels]. the history is of size ´filter_samples - 1´. If None, this will be substituted with zeros.
Return type: tuple(ndarray,ndarray)
Returns: filter output [data_samples], history item [hist_samples, channels]
mcfilter_py
Module¶
multichanneled filter application for time domain FIR filters
PYTHON IMPLEMENTATIONS USING SCIPY