Skip to content

Commit bba6ff5

Browse files
committed
cleaned a bit the use of the THRESHOLD
1 parent 5466863 commit bba6ff5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

PostProcessing/PostProcessVideos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def main(input_dir: Path, output_dir: Path):
9090
assert len(clientIDs) == len(df_list) == len(mp4_list) == len(repaired_df_list)
9191

9292
#
93-
# Find time ranges (Saurabh, To test better)
93+
# Find time ranges
9494
# Compute the time range
9595
min_common, max_common = compute_time_range(repaired_df_list)
9696

PostProcessing/dataframes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
from typing import Tuple
55

6-
THRESHOLD_NS = 10 * 1000 * 1000 # 10 milisecond
7-
86

97
def compute_time_step(video_timestamps: pd.DataFrame) -> float:
108
"""

PostProcessing/test_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
from video import video_info
1515

16+
from PostProcessVideos import THRESHOLD_NS
17+
1618

1719
RECSYNCH_SESSION_DIR_VAR = "RECSYNCH_SESSION_DIR"
1820

@@ -86,7 +88,7 @@ def test_df_reparation(client_data):
8688

8789
tstamps = repaired_df["timestamp"]
8890
diffs = tstamps.diff().dropna()
89-
assert (diffs <= time_step).all(), "some timestamps difference is longer than expected"
91+
assert (diffs <= (time_step + THRESHOLD_NS)).all(), "some timestamps difference is longer than expected"
9092

9193
pass
9294

0 commit comments

Comments
 (0)