Given filter coefficients, return the gain at a particular
    frequency.

    Parameters
    ----------
    b : list
        List of linear filter b coefficients
    a : list
        List of linear filter a coefficients
    f_gain : int or float, optional
        The frequency at which to calculate the gain
    fs : int or float, optional
        The sampling frequency of the system

def get_filter_gain(b, a, f_gain, fs):
    """
    Given filter coefficients, return the gain at a particular
    frequency.

    Parameters
    ----------
    b : list
        List of linear filter b coefficients
    a : list
        List of linear filter a coefficients
    f_gain : int or float, optional
        The frequency at which to calculate the gain
    fs : int or float, optional
        The sampling frequency of the system

    """
    # Save the passband gain
    w, h = signal.freqz(b, a)
    w_gain = f_gain * 2 * np.pi / fs

    ind = np.where(w >= w_gain)[0][0]
    gain = abs(h[ind])

    return gain