track_2 = np.array([1, 2, 44, 10000, 30000]) + actual_time_delay * frequency
track_2 = track_2 + frequency * np.random.uniform(-timestamp_noise,
    timestamp_noise, len(track_2))
deltas = []
for t1 in track_1:
    for t2 in track_2:
        deltas.append(t2 - t1)
sorted_deltas = np.sort(deltas) / frequency
truncated_deltas = np.array(sorted_deltas / timestamp_noise_threshold + 0.5,
    dtype=int) * timestamp_noise_threshold
truncated_time_delay = min(mode(truncated_deltas).mode, key=abs)
calculated_time_delay = np.mean(sorted_deltas[truncated_deltas ==
    truncated_time_delay])
print(('Calculated time delay (s):', calculated_time_delay))
Имеет ли смысл использовать взаимную корреляцию для массивов временных меток?