Skip to content

Commit df53a77

Browse files
committed
autotune: sanitize data before resampling
remove duplicates and re-order timestamps
1 parent 069ae81 commit df53a77

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

autotune/data_extractor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ def get_delta_mean(data_list):
117117
return dx
118118

119119
def resample_interp(t, u, t_new):
120-
interp = make_interp_spline(t, u, k=1)
120+
t_unique, indices = np.unique(t, return_index=True)
121+
interp = make_interp_spline(t_unique, u[indices], k=1)
121122
return interp(t_new)
122123

123124
def find_autotune_sequence(log, axis):

0 commit comments

Comments
 (0)