Source: GitHub
Signature¶
def sdynpy.signal_processing.sdynpy_interpolation.adaptive_linear_interpolation(y, x=None, rtol=0.001, atol=0.0, scale='range', max_points=None, return_reconstruction=False, relative_mode='global', local_floor_fraction=0.001)Adaptive piecewise-linear approximation with shared breakpoints across channels.
Parameters¶
y : array_like, shape (C, N) or (N,) Signal values.
x : array_like, shape (N,), optional Sample locations. If None, uses np.arange(N).
rtol : float or array_like, shape (C,) Relative tolerance(s).
atol : float or array_like, shape (C,) Absolute tolerance(s).
scale : {“range”, “maxabs”, “rms”} or array_like, shape (C,) Global scale per channel.
max_points : int, optional Maximum number of breakpoints including endpoints.
return_reconstruction : bool, default False If True, return reconstructed y_hat.
relative_mode : {“global”, “local”, “hybrid”}, default “global” How relative error is normalized.
local_floor_fraction : float, default 1e-3 Minimum local scale as a fraction of global channel scale.
Returns¶
breakpoints, x_bp, y_bp[, y_hat]