Spectral Approximation Quality

This demo explores the relationship between polynomial order and approximation accuracy. It highlights the high order often required to match the precision of the direct rational solvers used in the core library.

Chebyshev Order Comparison
import sgwt
import numpy as np
from sgwt import IMPEDANCE_TEXAS as L

def f(x): return np.array([sgwt.functions.bandpass(x, scale=1.0, order=1)]).T

ubnd = sgwt.estimate_spectral_bound(L)
x_eval = np.geomspace(1e-4, ubnd, 1000)
y_true = f(x_eval)

orders = [10, 50, 200]
Chebyshev Approximation Error