def kaiserord(ripple, width):
 A = abs(ripple)
 if (A < 8):
  raise ValueError(('Requested maximum ripple attentuation %f is too small for the Kaiser formula.' % A))
 beta = kaiser_beta(A)
 numtaps = ((((A - 7.95) / 2.285) / (np.pi * width)) + 1)
 return (int(ceil(numtaps)), beta)

def kaiserord ( ripple , width ) : A = abs ( ripple ) if ( A < 8 ) : raise ValueError ( ( 'Requested maximum ripple attentuation %f is too small for the Kaiser formula.' % A ) ) beta = kaiser_beta ( A ) numtaps = ( ( ( ( A - 7.95 ) / 2.285 ) / ( np . pi * width ) ) + 1 ) return ( int ( ceil ( numtaps ) ) , beta )
design a kaiser window to limit ripple and width of transition region .