sdr.FarrowResampler.clock_outputs(x: ArrayLike, rate: ArrayLike, n_outputs: int, mode: 'rate' | 'full' = 'rate') tuple[TypeAliasForwardRef('~numpy.typing.NDArray'), int]

Resamples the input signal \(x[n]\) by the given arbitrary rate \(r\).

\[x[n] = x(n T_s)\]
\[y[n] = x(n T_s / r)\]

Parameters:
x: ArrayLike

The input signal \(x[n] = x(n T_s)\) with length \(L\).

rate: ArrayLike

The resampling rate \(r\). The rate can either be a scalar or an array of the same size as the input signal \(x[n]\).

n_outputs: int

The requested number of output samples in \(y[n]\).

mode: 'rate' | 'full' = 'rate'

The convolution mode.

  • "rate": The output signal \(y[k]\) is aligned with the input signal, such that \(y[n] = x[n / r]\).

  • "full": The full convolution is performed, and the filter delay \(D\) is observed, such that \(y[n] = x[(n - D) / r]\).

Returns:

  • The resampled signal \(y[n]\).

  • The number of processed input samples n_inputs.

Examples

See the Farrow arbitrary resampler example.