From 6243b40f7055e3c86b20b7bed23a4ee599d3b1bb Mon Sep 17 00:00:00 2001 From: Jack Greenlee Date: Thu, 30 Jan 2025 14:58:41 -0500 Subject: [PATCH] update trip segmentation tests --- .../tests/analysisTests/intakeTests/TestTripSegmentation.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emission/tests/analysisTests/intakeTests/TestTripSegmentation.py b/emission/tests/analysisTests/intakeTests/TestTripSegmentation.py index 37af7bea6..9a5bd3eb1 100644 --- a/emission/tests/analysisTests/intakeTests/TestTripSegmentation.py +++ b/emission/tests/analysisTests/intakeTests/TestTripSegmentation.py @@ -70,7 +70,8 @@ def testSegmentationPointsDwellSegmentationTimeFilter(self): dstfsm = dstf.DwellSegmentationTimeFilter(time_threshold = 5 * 60, # 5 mins point_threshold = 10, distance_threshold = 100) # 100 m - segmentation_points = dstfsm.segment_into_trips(ts, tq) + loc_df = ts.get_data_df("background/filtered_location", tq) + segmentation_points = dstfsm.segment_into_trips(ts, tq, loc_df) for (start, end) in segmentation_points: logging.debug("trip is from %s (%f) -> %s (%f)" % (start.fmt_time, start.ts, end.fmt_time, end.ts)) self.assertIsNotNone(segmentation_points) @@ -88,7 +89,8 @@ def testSegmentationPointsDwellSegmentationDistFilter(self): dstdsm = dsdf.DwellSegmentationDistFilter(time_threshold = 10 * 60, # 5 mins point_threshold = 10, distance_threshold = 100) # 100 m - segmentation_points = dstdsm.segment_into_trips(ts, tq) + loc_df = ts.get_data_df("background/filtered_location", tq) + segmentation_points = dstdsm.segment_into_trips(ts, tq, loc_df) for (start, end) in segmentation_points: logging.debug("trip is from %s (%f) -> %s (%f)" % (start.fmt_time, start.ts, end.fmt_time, end.ts)) self.assertIsNotNone(segmentation_points)