stop reading many frames to get times for shifted_correlation

This commit is contained in:
robrobo
2025-09-05 14:47:53 +02:00
parent cd7097ad46
commit 6b7641f152

View File

@@ -147,7 +147,8 @@ def shifted_correlation(
num_frames = int(len(frames) * window)
ls = np.logspace(0, np.log10(num_frames + 1), num=points)
idx = np.unique(np.int_(ls) - 1)
t = np.array([frames[i].time for i in idx]) - frames[0].time
dt = round(frames[1].time - frames[0].time, 6) # round to avoid bad floats
t = idx * dt
result = np.array(
[