Correlation routines¶

tidynamics.
acf
(data)¶ Autocorrelation of the input data using the Fast Correlation Algorithm.
Computes the autocorrelation for all time lags in the input data. The numerical results for large lags contain fewer samples than for short lags and are not accurate. This is intrinsic to the computation and not a limitation of the algorithm.
For Ddimensional time series, a sum is performed on the last dimension.
Parameters: data (arraylike) – The input signal, of shape (N,) or (N,D). Returns: ndarray of shape (N,) with the autocorrelation for successive linearly spaced time delays

tidynamics.
msd
(pos)¶ Meansquared displacement (MSD) of the input trajectory using the Fast Correlation Algorithm.
Computes the MSD for all possible time deltas in the trajectory. The numerical results for large time deltas contain fewer samples than for small time times and are less accurate. This is intrinsic to the computation and not a limitation of the algorithm.
Parameters: pos (arraylike) – The input trajectory, of shape (N,) or (N,D). Returns: ndarray of shape (N,) with the MSD for successive linearly spaced time delays.

tidynamics.
cross_displacement
(pos)¶ Cross displacement of the components of the input trajectory.
Parameters: pos (arraylike) – The input trajectory, of shape (N, D). Returns: list of lists of times series, where the fist two indices [i][j] denote the coordinates for the cross displacement: “(Delta pos[:,i]) (Delta pos[:,j])”.

tidynamics.
correlation
(data1, data2)¶ Correlation between the input data using the Fast Correlation Algorithm.
For Ddimensional time series, a sum is performed on the last dimension.
Parameters:  data1 (arraylike) – The first input signal, of shape (N,) or (N,D).
 data2 (arraylike) – The first input signal, of equal shape as data1.
Returns: ndarray of shape (2*N1,) with the correlation for “data1*data2[tau]” where tau is the lag in units of the timestep in the input data. The correlation is given from time N to time N.