'Compute mean squared error versus ideal response across frequency
band.
h -- coefficients
bands -- list of (left, right) tuples relative to 1==Nyquist of
passbands'

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
