Created
April 19, 2018 13:32
-
-
Save bmcfee/746e572232be36f3bd462749fb1796da to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
scipy.signal.stft uses scale factor for the result https://github.com/scipy/scipy/blob/43b76937c0aadf23b4e0fcc04f546fa5d61b543b/scipy/signal/spectral.py#L1805
To get the same values you need to divide D2 in following way:
hamm_win = scipy.signal.get_window('hamming', 2048)
scale = np.sqrt(1.0 / hamm_win.sum()**2)
D2 = D2 / scale