skued.register_time_shifts

skued.register_time_shifts(traces, reference=None, method='auto')

Measure the time shifts between time traces and a reference by cross-correlation.

New in version 1.0.1.1.

Parameters:
  • traces (iterable of ndarrays) – Time traces. These time-traces should be physically equivalent. Generators of time traces are also supported. All traces and reference must have the same shape.

  • reference (~numpy.ndarray or None, optional) – If provided, the time-zero shift between the traces in traces will be measured with respect to reference. Otherwise, the first trace in traces will be used as a reference.

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

Returns:

shifts – Time shifts as indices (possibly fractional). The length of shifts is always equal to the number of time-traces; in the case where reference = None, the first shifts will always be identically zero.

Return type:

~numpy.ndarray, ndim 1, dtype float

:raises ValueError : if not all traces have the same shape.: :raises ValueError : if traces are not 1D arrays:

See also

register_time_shift

measure time-shift between a single trace and a reference.