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
referencemust have the same shape.reference (~numpy.ndarray or None, optional) – If provided, the time-zero shift between the traces in
traceswill be measured with respect toreference. Otherwise, the first trace intraceswill 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
shiftsis always equal to the number of time-traces; in the case wherereference = 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_shiftmeasure time-shift between a single trace and a reference.