torchsig.utils.dsp.multistage_polyphase_interpolator

torchsig.utils.dsp.multistage_polyphase_interpolator(input_signal: ndarray, resample_rate_ideal: float) ndarray[source]

Multi-stage polyphase filterbank-based interpolation

The interpolation is applied with two possible stages. The first stage implements the the fractional rate portion and the the second stage implements the integer rate portion.

For example, a resampling rate of 2.5 is an interpolation of 2.5. The interpolation of 2.5 is represented by an integer interpolation of 2, and the fractional rate is therefore 2.5/2 = 1.25. Therefore an interpolation of of 1.25 is applied followed by an interpolation of 2.

Parameters:
  • input_signal (np.ndarray) – The input signal

  • decimation_rate (float) – The interpolation rate. Must be greater or equal to 1.

Returns:

The interpolated signal

Return type:

np.ndarray