def mse(self, h, bands):
        w, H = freqz(h, worN=1024)
        f = w/np.pi
        passIndicator = np.zeros(len(w), bool)
        for left, right in bands:
            passIndicator |= (f >= left) & (f < right)
        Hideal = np.where(passIndicator, 1, 0)
        mse = np.mean(abs(abs(H)-Hideal)**2)
        return mse
Compute mean squared error versus ideal response across frequency
dataset/ETHPy150Open scipy/scipy/scipy/signal/tests/test_fir_filter_design.py/TestFirwin.mse