skued.register_time_shift

skued.register_time_shift(trace, reference, method='auto')

Measure the time shift between a time trace and a reference trace by normalized cross correlation.

New in version 1.0.1.1.

Parameters:
  • trace (array-like, shape (N,)) – Time trace. Must be the same lengths as reference. Only 1D traces are supported.

  • reference (array-like) – Reference trace.

  • method (str {'auto', 'fft', 'direct'}, optional) – A string indicating which method to use to calculate the correlation.

Returns:

shift – Index shift between the two traces, with respect to the reference trace. Note that the shift can be fractional.

Return type:

int or float

:raises ValueError : if trace and reference do not have the same shape.: :raises ValueError : if trace is not a 1D array:

See also

register_time_shifts

measure time-shift between multiple traces and a reference.

scipy.signal.choose_conv_method

contains more documentation on method