Return shift and value of maximum xcorr function
Parameters: | |
---|---|
Returns: | shift, value - Shift and value of maximum xcorr. |
Example
>>> fct = np.zeros(101)
>>> fct[50] = -1.0
>>> xcorr_max(fct)
(0.0, -1.0)
>>> fct[50], fct[60] = 0.0, 1.0
>>> xcorr_max(fct)
(10.0, 1.0)
>>> fct[60], fct[40] = 0.0, -1.0
>>> xcorr_max(fct)
(-10.0, -1.0)
>>> fct[60], fct[40] = 0.5, -1.0
>>> xcorr_max(fct, abs_max=True)
(-10.0, -1.0)
>>> xcorr_max(fct, abs_max=False)
(10.0, 0.5)