Exemplo n.º 1
0
def H0d_cheb(f):
    f = sp.mirror1(f, +1)
    N = f.shape[0]; h = 2*pi/N
    f = sp.F(f)
    f = sp.fourier_S(f, -h/2)
    f = sp.fourier_K(f, 0, h)
    f = sp.Finv(f)
    f = sp.unmirror1(f)
    return real(f)
Exemplo n.º 2
0
def H0d_cheb(f):
    f = sp.mirror1(f, +1)
    N = f.shape[0]
    h = 2 * pi / N
    f = sp.F(f)
    f = sp.fourier_S(f, -h / 2)
    f = sp.fourier_K(f, 0, h)
    f = sp.Finv(f)
    f = sp.unmirror1(f)
    return real(f)
Exemplo n.º 3
0
def H0_cheb(f):
    '''
    >>> sp.to_matrix(H0_cheb, 2)
    array([[ 0.75,  0.25],
           [ 0.25,  0.75]])
    '''
    f = sp.mirror0(f, +1)
    N = f.shape[0]; h = 2*pi/N
    f = sp.F(f)
    f = sp.fourier_K(f, 0, h/2)
    f = sp.Finv(f)
    f = sp.fold0(f, -1)
    return real(f)
Exemplo n.º 4
0
def H0_cheb(f):
    '''
    >>> sp.to_matrix(H0_cheb, 2)
    array([[ 0.75,  0.25],
           [ 0.25,  0.75]])
    '''
    f = sp.mirror0(f, +1)
    N = f.shape[0]
    h = 2 * pi / N
    f = sp.F(f)
    f = sp.fourier_K(f, 0, h / 2)
    f = sp.Finv(f)
    f = sp.fold0(f, -1)
    return real(f)