Interpolation Mode#

class InterpolationMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: SerializableEnum

Interpolation behaviour for sampling and resampling routines.

Considering a complex time series

\[\mathbf{s} = \left[s_{0}, s_{1},\,\dotsc, \, s_{M-1} \right]^{\mathsf{T}} \in \mathbb{C}^{M} \quad \text{with} \quad s_{m} = s(\frac{m}{f_{\mathrm{s}}})\]

sampled at rate \(f_{\mathrm{s}}\), so that each sample represents a discrete sample of a time-continuous underlying function \(s(t)\).

Given only the time-discrete sample vector \(\mathbf{s}\), resampling refers to

\[\hat{s}(\tau) = \mathscr{F} \left\lbrace \mathbf{s}, \tau \right\rbrace\]

estimating a sample of the original time-continuous function at time \(\tau\) given only the discrete-time sample vector \(\mathbf{s}\).


Interpolate to the nearest sampling instance.

\[\hat{s}(\tau) = s_{\lfloor \tau f_{\mathrm{s}} \rfloor}\]

Very fast, but not very accurate.

SINC = 1#

Interpolate using sinc kernels.

Also known as the Whittaker-Kotel’nikov-Shannon interpolation formula [1].

\[\hat{s}(\tau) = \sum_{m=0}^{M-1} s_{m} \operatorname{sinc} \left( \tau f_{\mathrm{s}} - m \right)\]

Perfect for bandlimited signals, not very fast.