cutcutcodec.core.signal.psd.intercorr

cutcutcodec.core.signal.psd.intercorr(signal_1: Tensor, signal_2: Tensor, win: Tensor, stride: int, return_std: bool = False) Tensor[source]

Compute the average intercorrelation of 2 signal using the Welch method.

Parameters

signal_1, signal_2torch.Tensor

The 2 broadcastable real temporal signals.

wintorch.Tensor

The 1d full window used, see cutcutcodec.core.signal.window.

strideint

The gap between two sliding windows, stride >= 1.

return_stdboolean, default=False

If True, return the standard deviation of the psd estimation.

Returns

psdtorch.Tensor

The average psd of each slices. Complex if intercorrelation and real if autocorrelation.

stdtorch.Tensor, if return_std == True

The unbiaised real standard deviation between all psd in each segment for each frequency band.