interpax_fft.FourierChebyshevSeries

class interpax_fft.FourierChebyshevSeries(f, domain=(-1, 1), lobatto=False, truncate=0)Source

Real-valued Fourier-Chebyshev series.

f(x, y) = ∑ₘₙ aₘₙ ψₘ(x) Tₙ(y) where ψₘ are trigonometric polynomials on [0, 2π] and Tₙ are Chebyshev polynomials on [yₘᵢₙ, yₘₐₓ].

Notes

Performance may improve if X and Y are powers of two.

Parameters:
  • f (jnp.ndarray) – Shape (…, X, Y). Samples of real function on the FourierChebyshevSeries.nodes grid.

  • domain (tuple[float]) – Domain for y coordinates. Default is [-1, 1].

  • lobatto (bool) – Whether f was sampled on the Gauss-Lobatto (extrema-plus-endpoint) instead of the interior roots grid for Chebyshev points.

  • truncate (int) – Index at which to truncate the Chebyshev series. This will remove aliasing error at the shortest wavelengths where the signal to noise ratio is lowest. The default value is zero which is interpreted as no truncation.

X

Fourier spectral resolution.

Type:

int

Y

Chebyshev spectral resolution.

Type:

int

__init__(f, domain=(-1, 1), lobatto=False, truncate=0)Source

Interpolate Fourier-Chebyshev series to f.

Methods

__init__(f[, domain, lobatto, truncate])

Interpolate Fourier-Chebyshev series to f.

compute_cheb(x)

Evaluate at coordinate x to get set of 1D Chebyshev series in y.

evaluate(X, Y)

Evaluate Fourier-Chebyshev series on tensor-product grid.

harmonics()

Real spectral coefficients aₘₙ of the interpolating polynomial.

nodes(X, Y[, L, domain, lobatto])

Tensor product grid of optimal collocation nodes for this basis.

Attributes

X

Y

domain

lobatto