Generate a tukey (tapered cosine) window
    :param winlen: length of the window, in samples
    :type winlen: int
    :param alpha: proportion of the window to be tapered. 
    0 = rectangular window
    1.0 = hann window
    :type alpha: float

def tukey(winlen, alpha):
    """
    Generate a tukey (tapered cosine) window
    :param winlen: length of the window, in samples
    :type winlen: int
    :param alpha: proportion of the window to be tapered. 
    0 = rectangular window
    1.0 = hann window
    :type alpha: float
    """
    taper = hann(winlen * alpha)
    rect = np.ones(winlen - len(taper) + 1)
    win = fftconvolve(taper, rect)
    win = win / np.amax(win)
    return win