Esempio n. 1
0
def fftsurr(x):
    """
    Compute an FFT phase randomized surrogate of x
    """
    z = fft(x)
    a = 2.*pi*1j
    phase = a*rand(len(x))
    z = z*exp(phase)
    return inverse_fft(z).real
Esempio n. 2
0
def fftsurr(x, detrend=detrend_none, window=window_none):
    """
    Compute an FFT phase randomized surrogate of x
    """
    x = window(detrend(x))
    z = fft(x)
    a = 2.*pi*1j
    phase = a*rand(len(x))
    z = z*exp(phase)
    return inverse_fft(z).real
Esempio n. 3
0
def fftsurr(x, detrend=detrend_none, window=window_none):
    """
    Compute an FFT phase randomized surrogate of x
    """
    x = window(detrend(x))
    z = fft(x)
    a = 2. * pi * 1j
    phase = a * rand(len(x))
    z = z * exp(phase)
    return inverse_fft(z).real