Message Boards Message Boards

Why does Periodogram not reproduce squared magnitude of Fourier output?

All, I am relatively new to Mathematica, and attempting to build some data analysis tools for analysis of time series. Right now I am working my way through understanding the Fourier function, and having difficulty understanding the difference between Fourier and Periodogram outputs. I set up a very simple example of a 10 Hz Sin wave and expected to get a very simple spectrograph with a peak at 10 Hz. I can get close to this with the Fourier function by squaring the absolute value of the output. Based on my reading on the Periodogram function, it should do exactly the same, but i can't understand why the two graphs are so different.

data = Table[Sin[2*\[Pi]*10 x], {x, 0, 1, .001}] ;
ListLinePlot[Abs[Fourier[data]]^2, PlotRange -> {{0, 60}, All}]
Periodogram[data]

I'm hoping to get Periodogram to work because it seems much simpler to apply a window using this function. Any advice or insight would be greatly appreciated. Thanks, Mike.

POSTED BY: Michael Marino
3 Replies

Period gram has the option

ScalingFunction

Which has the default value "dB". To compare with the absolute value squared of the Fourier transform you will want to make that option be "Absolute"

POSTED BY: David Reiss

David, That solved it nicely. Thank you for the help! Mike.

POSTED BY: Michael Marino

ScalingFunctions :)

POSTED BY: michael colacino
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract