butter_pass_filter

hhpy.ds.butter_pass_filter(data: pandas.core.series.Series, cutoff: int, fs: int, order: int, btype: str = None, shift: bool = False)[source]

Implementation of a highpass / lowpass filter using scipy.signal.butter

Parameters:
  • data – pandas Series or 1d numpy Array
  • cutoff – cutoff
  • fs – critical frequencies
  • order – order of the fit
  • btype – The type of filter. Passed to scipy.signal.butter. Default is ‘lowpass’. One of {‘lowpass’, ‘highpass’, ‘bandpass’, ‘bandstop’}
  • shift – whether to shift the data to start at 0
Returns:

1d numpy array containing the filtered data