seg1d.optimized_funcs.rcor¶
-
seg1d.optimized_funcs.
rcor
(x, Y)[source]¶ Correlation of multiple arrays to a single array using a rolling window correlation.
Parameters: - x1d array
target array
- Yndarray
references resampled to correct size
Returns: - n x m array
correlations of one ndarray to an m x ndarray
Notes
This will try to use numba for optimization.
Examples
>>> import numpy as np >>> import seg1d.optimized_funcs as optF
>>> x = np.sin( np.linspace(-3, 3, 25) ) >>> y = np.sin( np.linspace(-3, 3, 60) ).reshape(3,20)
>>> optF.rcor(x,y) array([[-0.50743663, -0.66692675, -0.78849873, -0.87803067, -0.93682968, -0.96013818], [ 0.83362263, 0.91097751, 0.94663428, 0.94663428, 0.91097751, 0.83362263], [-0.96013818, -0.93682968, -0.87803067, -0.78849873, -0.66692675, -0.50743663]])