torchsig.utils.dsp.polyphase_fractional_resampler

torchsig.utils.dsp.polyphase_fractional_resampler(input_signal: ndarray, fractional_rate: float) ndarray[source]

Fractional rate polyphase resampler

Implements a fractional rate resampler through the SciPy upfirdn() function with a large number of branches. A fixed “up” rate of 10,000 is used and the fractional rate then deterimes the “down” rate, such that up/down reasonably approximates the desired fractional resampling rate.

Parameters:
  • input_signal (np.ndarray) – Input signal to be resampled

  • fractional_rate (float) – The fractional interpolation rate, must be greater than 0.

Returns:

Resampled signal

Return type:

np.ndarray