Skip to content

Instantly share code, notes, and snippets.

@0xfe
Created March 2, 2020 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xfe/08204e72217ce29f06ac4c1ba7dd4d39 to your computer and use it in GitHub Desktop.
Save 0xfe/08204e72217ce29f06ac4c1ba7dd4d39 to your computer and use it in GitHub Desktop.
Return the spectrogram of a complex-valued signal
import numpy as np
import matplotlib.pyplot as plt
from scipy import signal
def spectrogram(xs):
return signal.spectrogram(xs, 256, window=('hann'), nperseg=256, nfft=256, noverlap=200, mode='complex')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment