1
$\begingroup$

I was told that the fast Chebyshev transform has superior spectral convergence, but I am unable to verify its rumored convergence. I was given plots of its spectral convergence, where the signal's 40th Chebyshev coefficient shrinks to $10^{-16}$ from its largest. The signal was a Gaussian sampled evenly distributed 64 data points. My implementation of the fast Chebyshev transform only yields the 40th Chebyshev coefficient to be $10^{-2}$ smaller than the largest. Unfortunately, I have not been given permission yet to post the plots of the supposed convergence. I wrote code in Python to reproduce the results for myself, to convenience myself of the power of the fast Chebyshev transform. Below is my Python code for implementing the fast Chebyshev transform and sorting the log absolute of the Chebyshev coefficients. Am I using the incorrect implementation of the fast Chebyshev transform?

def fct(xp,fp): # fast Chebyshev transform
    # size of array
    N = xp.size
    # define Chebyshev grid and scale/translate to fit inside window
    x = xp[0]+(xp[n-1]-xp[0])*(1-np.cos(np.pi*(np.arange(N)+1/2)/N))/2
    # interpolate signal from Chebyshev grid and compute Chebyshev coefficients
    a = ((-1)**(np.arange(N)))*dct(np.interp(x,xp,fp),type=2)
    a[0]=a[0]/2
    return a
def sortnormlogspec(a,ee=1e-100): # normalize data to log absolute
    # log10 abs norm with -100 floor
    b=np.log10(ee+np.abs(a))
    # sort from largest to smallest coefficient
    b=sorted(b,reverse=True)
    return b

Below are my plots of the results.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.