torchsig.transforms.functional.spectrogram_image

torchsig.transforms.functional.spectrogram_image(data: ndarray, fft_size: int, fft_stride: int, black_hot: bool = True) ndarray[source]

Creates spectrogram from IQ samples.

This function computes the spectrogram and converts it to a grayscale image.

Parameters:
  • data – IQ samples.

  • fft_size – The FFT size (number of bins) in the spectrogram.

  • fft_stride – The number of data points to move or “hop” over when computing the next FFT.

  • black_hot – Toggles black hot spectrogram. Defaults to True (black hot).

Returns:

Spectrogram image in BGR format.