From 4209aea3ec3060cf5e5d73221826ec56ddf913fd Mon Sep 17 00:00:00 2001 From: David PAGNON Date: Tue, 5 Dec 2023 12:11:29 +0100 Subject: [PATCH] weird error where all : and , deleted in copy --- Pose2Sim/Utilities/synchronize_cams_draft.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pose2Sim/Utilities/synchronize_cams_draft.py b/Pose2Sim/Utilities/synchronize_cams_draft.py index 6cc7804..228f98c 100644 --- a/Pose2Sim/Utilities/synchronize_cams_draft.py +++ b/Pose2Sim/Utilities/synchronize_cams_draft.py @@ -104,7 +104,7 @@ def interpolate_nans(col, kind): # idx_notgood = np.delete(np.arange(len(col)), idx_good) if not kind: # 'linear', 'slinear', 'quadratic', 'cubic' - f_interp = interpolate.interp1d(idx_good, col[idx_good], kind=cubic, bounds_error=False) + f_interp = interpolate.interp1d(idx_good, col[idx_good], kind='cubic', bounds_error=False) else: f_interp = interpolate.interp1d(idx_good, col[idx_good], kind=kind[0], bounds_error=False) col_interp = np.where(np.isfinite(col), col, f_interp(idx)) #replace nans with interpolated values @@ -140,7 +140,7 @@ for i, json_dir in enumerate(json_dirs): df_coords.append(convert_json2csv(json_dir)) df_coords[i] = drop_col(df_coords[i],3) # drop likelihood -b, a = signal.butter(42, cut_off_frequency(fps2), 'low', analog = False) +b, a = signal.butter(42, cut_off_frequency(fps*2), 'low', analog = False) for i in range(len(json_dirs)): df_coords[i] = pd.DataFrame(signal.filtfilt(b, a, df_coords[i], axis=0)) # filter