welsh
- mutis.lib.welsh(t1, d1, t2, d2, t, dt)[source]
Welsh (1999) correlation with adaptative binning.
This function implements the correlation function proposed by Welsh (1999), which allows for the computation of the correlation for -discrete- signals non-uniformly sampled in time.
- Parameters
- Returns
- res
ndarray(size len(t)) Values of the correlation at the times t.
- res
Examples
An example of raw usage would be:
>>> import numpy as np >>> from mutis.lib.correlation import welsh_ab >>> t1 = np.linspace(1, 10, 100); s1 = np.sin(t1) >>> t2 = np.linspace(1, 10, 100); s2 = np.cos(t2) >>> t = np.linspace(1, 10, 100); dt = np.full(t.shape, 0.1) >>> welsh(t1, d1, t2, d2, t, dt)
However, it is recommended to be used as expalined in the standard MUTIS’ workflow notebook.