def enbw ( wnd ) : return sum ( el ** 2 for el in wnd ) / sum ( wnd ) ** 2 * len ( wnd )
applying gain to certain frequency range in python
Equivalent Noise Bandwidth in bins ( Processing Gain reciprocal ) .
def enbw(wnd):
  """ Equivalent Noise Bandwidth in bins (Processing Gain reciprocal). """
  return sum(el ** 2 for el in wnd) / sum(wnd) ** 2 * len(wnd)