optic.dsp.core.blockwiseFFTConv

blockwiseFFTConv(x, h, NFFT=None, freqDomainFilter=False)

Blockwise convolution in the frequency domain using the overlap-and-save FFT method.

Parameters:
  • x (ndarray) – Input signal.

  • h (ndarray) – Filter impulse response.

  • NFFT (int, optional) – FFT size to be used. Must be greater than the length of the filter. If None, it will be set to the next power of 2 greater than or equal to the length of the filter. Default is None.

  • freqDomainFilter (bool, optional) – If True, h is assumed to be the frequency response of the filter. If False, the FFT of h will be computed. Default is False.

Returns:

y – The filtered output signal.

Return type:

ndarray

Raises:

ValueError – If NFFT is not greater than the length of the filter h.