butter_lowpass#

pypillometry.signal.butter_lowpass(cutoff, fs, order=5)[source]#

Get lowpass-filter coefficients for Butterworth-filter.

Parameters:
  • cutoff (float) – lowpass-filter cutoff in Hz

  • fs (float) – sampling rate in Hz

  • order (int) – filter order

Returns:

b, a (np.ndarray) – numerator and denominator filter coefficients (see scipy.signal.butter())

Raises:

ValueError – if cutoff is not between 0 and the Nyquist frequency (fs/2)