Python Cross Power Spectral Density


The scripts on this page require the utility module:

* * *

Main Script

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

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:

* * *

– Tom Irvine


Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s