Python Cross Power Spectral Density

Utilities

The scripts on this page require the utility module: tompy.py

* * *

Main Script

This script calculates the cross power spectral density of two signals: cross_psd.py

The script has an option to sub-divide the data into segments and then take an ensemble average. This tends to smooth the resulting magnitude and phase curves, but the spectral frequency resolution is widened as a trade-off.

The script also calculate the coherence function.

This method is best-suited for stationary data.

* * *

Alternate Script

Here is an alternate script set that calculates the cross spectral density as a single record using the entire signal.

This method would be appropriate for the case of transient pulses: CPSD_from_fourier.py

* * *

– Tom Irvine

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s