stop reading many frames to get times for shifted_correlation
This commit is contained in:
@@ -147,7 +147,8 @@ def shifted_correlation(
|
|||||||
num_frames = int(len(frames) * window)
|
num_frames = int(len(frames) * window)
|
||||||
ls = np.logspace(0, np.log10(num_frames + 1), num=points)
|
ls = np.logspace(0, np.log10(num_frames + 1), num=points)
|
||||||
idx = np.unique(np.int_(ls) - 1)
|
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(
|
result = np.array(
|
||||||
[
|
[
|
||||||
|
Reference in New Issue
Block a user