pygwb.util.calc_rho

pygwb.util.calc_rho(N, j, window_tuple='hann', overlap_factor=0.5)[source]

Calculate the normalised correlation of a window with itself shifted j times. This is identical to the rho(j) from Welch (1967).

Parameters:
  • N (int) – Length of the window.

  • j (int) – Number of “shifts” to apply to the window when correlating with itself.

  • window_tuple (str or tuple, optional) – Window name or tuple as used in scipy.signal.get_window(). Default is window_tuple="hann".

  • overlap_factor (float, optional) – Defines the overlap between consecutive segments used in the calculation. Default is 0.5.

Returns:
rho: float

The normalised window correlation rho(j).

See also

scipy.signal.get_window

More information here.