Exemplo n.º 1
0
Arquivo: fft.py Projeto: pygsl/pygsl
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)
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 4
0
Arquivo: fft.py Projeto: pygsl/pygsl
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)