sdr.FIR.__call__(x: ArrayLike, mode: 'full' | 'valid' | 'same' = 'full') NDArray

Filters the input signal \(x[n]\) with the FIR filter.

Parameters:
x: ArrayLike

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

mode: 'full' | 'valid' | 'same' = 'full'

The non-streaming convolution mode.

  • "same": The output signal \(y[n]\) has length \(L\). Output sample 0 aligns with input sample 0.

  • "full": The full convolution is performed. The output signal \(y[n]\) has length \(L + N\), where \(N\) is the order of the filter. Output sample delay aligns with input sample 0.

In streaming mode, the "full" convolution is performed. However, for each \(L\) input samples only \(L\) output samples are produced per call. A final call to flush() is required to flush the filter state.

Returns:

The filtered signal \(y[n]\). The output length is dictated by the mode argument.

Examples

See the FIR filters example.