Resampling Routines

delay_resampling_matrix(sampling_rate, num_samples_in, delay, num_samples_out=- 1)

Generate an interpolation-matrix for resampling a signal at a specific delay.

Parameters
  • sampling_rate (float) – Rate in Hz at which the signal to be transformed is sampled.

  • num_samples_in (int) – Number of samples provided.

  • delay (float) – Delay in seconds, by which the sampled signal should be shifted.

  • num_samples_out (int, optional) – Number of output samples.

Returns

A MxN linear resampling transformation matrix, where M is the number of input samples and N is the number of resampled output samples. Due to the delay, M might be bigger (or smaller for negative delays) than N, so that the transformation matrix is not necessarily square.

Return type

np.ndarray