(self, lowcut, highcut, fs, order=5)
return b, a
Returns the coefficients of a butterworth filter.

    If lowcut = 0, the function returns the coefficients of a low pass filter.
    Otherwise, the coefficients of a band pass filter are returned.
    Highcut should be > 0

    Args:
      lowcut: low cutoff frequency
      highcut: high cutoff frequency
      fs: sampling rate
      order: filter order
    Return:
      b, a: parameters of a butterworth filter
Returns the coefficients of a butterworth filter.
Returns the coefficients of a butterworth filter .
def butter_filter(self, lowcut, highcut, fs, order=5):
    """Returns the coefficients of a butterworth filter.

    If lowcut = 0, the function returns the coefficients of a low pass filter.
    Otherwise, the coefficients of a band pass filter are returned.
    Highcut should be > 0

    Args:
      lowcut: low cutoff frequency
      highcut: high cutoff frequency
      fs: sampling rate
      order: filter order
    Return:
      b, a: parameters of a butterworth filter
    """
    nyq = 0.5 * fs
    low = lowcut / nyq
    high = highcut / nyq
    if low:
      b, a = butter(order, [low, high], btype='band')
    else:
      b, a = butter(order, [high], btype='low')
    return b, a
def butter_filter ( self , lowcut , highcut , fs , order = 5 ) : nyq = 0.5 * fs low = lowcut / nyq high = highcut / nyq if low : b , a = butter ( order , [ low , high ] , btype = 'band' ) else : b , a = butter ( order , [ high ] , btype = 'low' ) return b , a