interpax_fft.rfft_interp1d
- interpax_fft.rfft_interp1d(f: Num[Array, 'nx ...'] | Num[ndarray, 'nx ...'] | Num[TypedNdArray, 'nx ...'], n: int, sx: Num[Array, 's'] | Num[ndarray, 's'] | Num[TypedNdArray, 's'] | None = None, dx: float = 1.0) Inexact[Array, 'n ... s']Source
Interpolation of a real-valued 1D periodic function via FFT.
- Parameters:
f (ndarray, shape(nx, ...)) – Source data. Assumed to cover 1 full period, excluding the endpoint.
n (int) – Number of desired interpolation points.
sx (ndarray or None) – Shift in x to evaluate at. If original data is f(x), interpolates to f(x + sx).
dx (float) – Spacing of source points.
- Returns:
fi (ndarray, shape(n, …, len(sx))) – Interpolated (and possibly shifted) data points.