def highpass(s, f, order=2, fs=1000.0, use_filtfilt=False):
    '''
    @brief: for a given signal s rejects (attenuates) the frequencies lower
    then the cuttof frequency f and passes the frequencies higher than that
    value by applying a Butterworth digital filter

    @params:

    s: array-like
    signal

    f: int
    the cutoff frequency

    order: int
    Butterworth filter order

    fs: float
    sampling frequency

    @return:

    signal: array-like
    filtered signal

    '''

    b, a = signal.butter(order, f * 2 / (fs/2), btype='highpass')
    if use_filtfilt:
        return filtfilt(b, a, s)

    return signal.lfilter(b, a, s)
@brief: for a given signal s rejects (attenuates) the frequencies lower
    then the cuttof frequency f and passes the frequencies higher than that
    value by applying a Butterworth digital filter

    @params:

    s: array-like
    signal

    f: int
    the cutoff frequency

    order: int
    Butterworth filter order

    fs: float
    sampling frequency

    @return:

    signal: array-like
    filtered signal