torchsig.utils.dsp.multistage_polyphase_decimator

torchsig.utils.dsp.multistage_polyphase_decimator(input_signal: ndarray, decimation_rate: float) ndarray[source]

Multi-stage polyphase filterbank-based decimation

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

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

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

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

Returns:

The decimated signal

Return type:

np.ndarray