pydiogment.utils.filters#

pydiogment.utils.filters.butter_bandpass(low_cut, high_cut, fs, order=5)[source]#

Design band pass filter.

Parameters
  • low_cut (float) – the low cutoff frequency of the filter.

  • high_cut (float) – the high cutoff frequency of the filter.

  • fs (float) – the sampling rate.

  • order (int) – order of the filter, by default defined to 5.

pydiogment.utils.filters.butter_filter(sig, fs, ftype='low', low_cut=50, high_cut=2000, order=5)[source]#

Apply filter to signal.

Parameters
  • sig (array) – the signal array to filter.

  • fs (float) – the sampling rate.

  • ftype (str) – the filter type, by default defined to a low pass filter

  • low_cut (float) – the low cutoff frequency, by default defined to 50Hz

  • high_cut (float) – the high cutoff frequency, by default defined to 2000Hz.

  • order (int) – order of the filter, by default defined to 5.

Returns

array of the filtered signal.

pydiogment.utils.filters.butter_highpass(cutoff, fs, order=5)[source]#

Design a highpass filter.

Parameters
  • cutoff (float) – the cutoff frequency of the filter.

  • fs (float) – the sampling rate.

  • order (int) – order of the filter, by default defined to 5.

pydiogment.utils.filters.butter_lowpass(cutoff, fs, order=5)[source]#

Design lowpass filter.

Parameters
  • cutoff (float) – the cutoff frequency of the filter.

  • fs (float) – the sampling rate.

  • order (int) – order of the filter, by default defined to 5.