DOC: signal: add an example cross-spectrogram application #20622
Labels
Documentation
Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org
scipy.signal
Is your feature request related to a problem? Please describe.
There is functionality for calculating the
stft
or thespectrogram
(Sxx=Zxx**2
) of a signal, but there is no functionality to do a similar process to analyze the temporal correlations of two signals. A function plotting some kind of "csd spectrogram"Zxy
would be useful. Similarly, a "coherence spectrogram"Sxy
analogous to thespectrogram
function.Describe the solution you'd like.
The function
scipy.stats.stft
calls_spectral_helper(x, x, ...)
. In other words, it calculates the spectral density ofx(f)x*(f)
. To get the csd one would need to call_spectral_helper(x, y, ...)
and calculatex(f)y*(f)
. (See wikipedia).Describe alternatives you've considered.
The package
GWpy
, designed for data analysis in gravitational wave astronomy, already has such functionality. See docs ofcsd_spectrogram
andcoherence_spectrogram
.Additional context (e.g. screenshots, GIFs)
No response
The text was updated successfully, but these errors were encountered: