interpax_fft.DoubleChebyshevSeries

class interpax_fft.DoubleChebyshevSeries(f, domain_x=(-1, 1), domain_y=(-1, 1), lobatto=False, truncate_x=0, truncate_y=0)Source

Real-valued 2D Chebyshev series.

f(x, y) = ∑ₘₙ aₘₙ Tₘ(x) Tₙ(y) where Tₘ are Chebyshev polynomials on [xₘᵢₙ, xₘₐₓ] 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 ChebyshevSeries.nodes grid.

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

  • domain_y (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_x (int) – Index at which to truncate the Chebyshev series in x coordinate. 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.

  • truncate_y (int) – Index at which to truncate the Chebyshev series in y coordinate. 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

Chebyshev spectral resolution in x coordinate.

Type:

int

Y

Chebyshev spectral resolution in y coordinate.

Type:

int

__init__(f, domain_x=(-1, 1), domain_y=(-1, 1), lobatto=False, truncate_x=0, truncate_y=0)Source

Interpolate Chebyshev-Chebyshev series to f.

Methods

__init__(f[, domain_x, domain_y, lobatto, ...])

Interpolate Chebyshev-Chebyshev series to f.

compute_cheb(x)

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

evaluate(X, Y)

Evaluate Chebyshev series on tensor-product grid.

nodes(X, Y[, L, domain_x, domain_y, lobatto])

Tensor product grid of optimal collocation nodes for this basis.

Attributes

X

Y

domain_x

domain_y

lobatto