Пример #1
0
def mjwfft_overhead(N,s=1.,t=1.,shift=0.,scale=1.):
    from jfft import jacfft_overhead
    from maps import sqrt_wjacobiw
    from quad import gq
    
    A = s-1
    B = t-1

    A = int(A)
    B = int(B)

    # Use canonical quadrature points
    [x,w] = gq(N,s=1.,t=1.,scale=scale,shift=shift)

    # Must multiply by the sqrt of the Jacobian and then do FFT
    factors = sqrt_wjacobiw(x,s=s,t=t,scale=scale,shift=shift)

    jo = jacfft_overhead(N,A,B)
    return [factors, jo]
Пример #2
0
def mjwifft(U,s=1.,t=1.,shift=0.,scale=1.):
    from jfft import jacifft
    from maps import sqrt_wjacobiw
    from quad import gq

    A = s-1
    B = t-1

    A = int(A)
    B = int(B)

    N = U.size

    # Use canonical quadrature points
    [x,w] = gq(N,s=1.,t=1.,scale=scale,shift=shift)

    # Inverse transform
    u = jacifft(U,A,B)

    # Multiply by factors
    factors = sqrt_wjacobiw(x,s=s,t=t,scale=scale,shift=shift)
    return u*factors