coherence#

gwpy.signal.spectral.coherence(
timeseries: TimeSeries,
other: TimeSeries,
segmentlength: int,
downsample: bool | None = None,
noverlap: int | None = None,
**kwargs,
) FrequencySeries[source]#

Calculate the coherence between two TimeSeries using Welch’s method.

Parameters:
timeseriesTimeSeries

Time-series of data.

otherTimeSeries

Time-series of data.

segmentlengthint

Number of samples in single average..

noverlapint

Number of samples to overlap between segments, defaults to 50%.

downsamplebool

Downsample the series with higher sampling frequency? SciPy assumes that both TimeSeries have the same rate.

kwargs

Other keyword arguments are passed to scipy.signal.coherence().

Returns:
spectrumFrequencySeries

Average power FrequencySeries.