def lowpass1(y, dt, fc=3):
    ' \n    1st order low pass filter\n    '
    tau = (1 / ((2 * np.pi) * fc))
    alpha = (dt / (tau + dt))
    y_filt = np.zeros(y.shape)
    y_filt[0] = y[0]
    for i in np.arange(1, len(y)):
        y_filt[i] = ((alpha * y[i]) + ((1 - alpha) * y_filt[(i - 1)]))
    return y_filt
1st order low pass filter
def lowpass1(y, dt, fc=3):
    ' \n    \n    '
    tau = (1 / ((2 * np.pi) * fc))
    alpha = (dt / (tau + dt))
    y_filt = np.zeros(y.shape)
    y_filt[0] = y[0]
    for i in np.arange(1, len(y)):
        y_filt[i] = ((alpha * y[i]) + ((1 - alpha) * y_filt[(i - 1)]))
    return y_filt