# Path: pyfasst/tools/utils.py
# def nextpow2(i):
#     """
#     Find :math:`2^n` that is equal to or greater than.
#     
#     code taken from the website:
#     
#      http://www.phys.uu.nl/~haque/computing/WPark_recipes_in_python.html
#     """
#     n = 2
#     while n < i:
#         n = n * 2
#     return n
# 
# def sqrt_blackmanharris(M):
#     """A root-squared Blackman-Harris window function.
#     
#     For use in scholkhuber and klapuri's framework.
#     """
#     return np.sqrt(spsig.blackmanharris(M))


import numpy as np
import scipy.signal as spsig  # for the windows and filters
import scipy.interpolate as spinterp
        import matplotlib.pyplot as plt
from stft import stft, istft
from ..tools.utils import nextpow2, sqrt_blackmanharris
      half as many frames as the direct upper analysis octave.)
     
    Attributes:
    
     sparKernel
     weight
     atomHOP
     FFTLen
     fftOLP
     fftHOP
     bins
     winNr
     Nk_max
     Q 
     fmin
     fmax
     frequencies
     perfRast
     first_center
     fs 
     winFunc
     thresh
     q
    
    
    """
    def __init__(self, fmax, bins, fs,
                 q = 1,
                 atomHopFactor = 0.25,
                 thresh = 0.0005, 

# Path: pyfasst/tools/utils.py
# def nextpow2(i):
#     """
#     Find :math:`2^n` that is equal to or greater than.
#     
#     code taken from the website:
#     
#      http://www.phys.uu.nl/~haque/computing/WPark_recipes_in_python.html
#     """
#     n = 2
#     while n < i:
#         n = n * 2
#     return n
# 
# def sqrt_blackmanharris(M):
#     """A root-squared Blackman-Harris window function.
#     
#     For use in scholkhuber and klapuri's framework.
#     """
#     return np.sqrt(spsig.blackmanharris(M))


# Path: pyfasst/tftransforms/minqt.py
import numpy as np
import scipy.signal as spsig  # for the windows and filters
import scipy.interpolate as spinterp
        import matplotlib.pyplot as plt
from stft import stft, istft
from ..tools.utils import nextpow2, sqrt_blackmanharris

      half as many frames as the direct upper analysis octave.)
     
    Attributes:
    
     sparKernel
     weight
     atomHOP
     FFTLen
     fftOLP
     fftHOP
     bins
     winNr
     Nk_max
     Q 
     fmin
     fmax
     frequencies
     perfRast
     first_center
     fs 
     winFunc
     thresh
     q
    
    
    """
    def __init__(self, fmax, bins, fs,
                 q = 1,
                 atomHopFactor = 0.25,
                 thresh = 0.0005, 

                 winFunc = sqrt_blackmanharris,