torchsig.utils.dsp.frequency_shift

torchsig.utils.dsp.frequency_shift(signal: ndarray, frequency: float, sample_rate: float) ndarray[source]

Performs a frequency shift

Parameters:
  • signal (np.ndarray) – Input signal

  • frequency (float) – The frequency to shift by. Must have the same units as sample_rate.

  • sample_rate (float) – The sample rate of the signal. Must have the same units as frequency.

Returns:

The frequency shifted signal

Return type:

np.ndarray