Here are some Python code examples.

Notes on power spectral density.