def wlogmorlet(f0, sd, sampling_rate, ns=5, normed='area'):
    """
    returns a complex log morlet wavelet in the time domain

    Parameters
    ----------
        f0 : center frequency
        sd : standard deviation of frequency
        sampling_rate : samplingrate
        ns : window length in number of standard deviations
    """
    st = (2. * np.pi * sd) / 1.
    w_sz = int(ns * st * sampling_rate)  # half time window size
    wf = wlogmorlet_fft(f0, sd, sampling_rate=sampling_rate, nt=2 * w_sz + 1)
    w = fftpack.fftshift(fftpack.ifft(wf))
    if normed == 'area':
        w /= w.real.sum()
    elif normed == 'max':
        w /= w.real.max()
    elif normed == 'energy':
        w /= np.sqrt((w ** 2).sum())
    else:
        assert 0, 'unknown norm %s' % normed
    return w
dataset/ETHPy150Open nipy/nitime/nitime/algorithms/wavelet.py/wlogmorlet/swapped operands of `/`