Cut the record in windows of duration T, starting at times tk
Fourier transform of each window, tapered by w
u^(tk,f)=∫0Tw(τ)u(tk+τ)e−2iπfτdτ
Power spectral density, in decibels
P(tk,f)=10log10T2∣u^(tk,f)∣2
With scipy.signal.spectrogram: nperseg samples per window, and noverlap samples shared by two windows