pyeeg.preprocess.create_filterbank

pyeeg.preprocess.create_filterbank(freqs, srate, filtertype=<function cheby2>, **kwargs)

Creates a filter bank, by default of chebychev type 2 filters. Parameters of filter are to be defined as name value pair arguments. Frequency bands are defined with boundaries instead of center frequencies.

Parameters:
  • freqs (list or ndarray of float) – Boundary frequencies of the bands (in Hz). Each value is normalized by the Nyquist frequency (srate / 2) and passed as the Wn argument to the filter design function.

  • srate (float) – Sampling rate of the signal (in Hz).

  • filtertype (callable) – Filter design function used to build each filter (e.g. scipy.signal.cheby2, scipy.signal.butter). Must accept Wn and the keyword arguments in **kwargs.

  • **kwargs – Additional name-value pairs passed to filtertype (e.g. Rs, N, or btype for Chebyshev type II filters).

Returns:

fbank – List of filter coefficients, one (b, a) tuple per frequency band.

Return type:

list