Beispiel #1
0
def complex_example():
    n = 630
    space = fft.complex_workspace(n)
    wavetable = fft.complex_wavetable(n)
    print(space.get_type())
    print(wavetable.get_type())
    print(wavetable.get_factors())
    data = numx.zeros((630, ), numx.Complex)
    data[:11] = 1.0
    data[11:] = 1.0
    d = data[:]
    fft.complex_forward(data, space, wavetable)
Beispiel #2
0
def complex_example_simple():
    n = 16
    data = numx.arange(n) * (2 * numx.pi / n)
    data = numx.cos(data) +0j
    space = fft.complex_workspace(n)
    wavetable = fft.complex_wavetable(n)

    print data
    #data[:11] = 1.0
    #data[11:] = 1.0
    tmp = fft.complex_backward(data, space, wavetable)
    print "tmp", tmp
Beispiel #3
0
def complex_example():
    n = 630
    space = fft.complex_workspace(n)
    wavetable = fft.complex_wavetable(n)
    print space.get_type()
    print wavetable.get_type()
    print wavetable.get_factors()
    data = numx.zeros((630,), numx.Complex)
    data[:11] = 1.0
    data[11:] = 1.0
    d = data[:]
    fft.complex_forward(data, space, wavetable)
Beispiel #4
0
def complex_example_simple():
    n = 16
    data = numx.arange(n) * (2 * numx.pi / n)
    data = numx.cos(data) + 0j
    space = fft.complex_workspace(n)
    wavetable = fft.complex_wavetable(n)

    print(data)
    #data[:11] = 1.0
    #data[11:] = 1.0
    pygsl.init.set_debug_level(0)
    tmp = fft.complex_backward(data, space, wavetable)
    print("tmp", tmp)