2

I am trying to evaluate the frequency domain of several signals. For this I used the PSD implementation given in this answer. As a comparison I used the signal.periodogram function provided in scipy:

from scipy.signal import tukey
import scipy as sp
f, Pxx_den = sp.signal.periodogram(a_gtrend_orig,12,window=tukey( len(a_gtrend_orig) ))

However when I plot this next to the self-implemented PSD they look significantly different:

Comparison of PSD algorithms

As the same window function is used and the periodogram function should also use an FFT where does this difference coming from?

Axel
  • 1,415
  • 1
  • 16
  • 40

1 Answers1

1

The example that you are comparing this to, is graphing the amplitude at each frequency bin, i.e, abs(fft())

The periodogram produces a power spectral density, that means it is the square of the amplitude at each frequency bin.

The label "windowed psd" is from an early edit, and was corrected later.

DrM
  • 2,404
  • 15
  • 29