def testSmoothZigZagPosdapWalkOneZigZag(self):
     tp = json.load(open("emission/tests/data/smoothing_data/walk_one_zigzag.json"))
     (retained_indices, removed_indices) = tags.smooth_zigzag_boundary(tp)
     logging.info("removed indices = %s" % removed_indices)
     self.assertEqual(len(removed_indices), 1)
     self.assertEqual(removed_indices, [5])
 def testSmoothZigZagBoundaryOneZigZag(self):
     tp = json.load(open("emission/tests/data/smoothing_data/caltrain_one_zigzag.json"))
     (retained_indices, removed_indices) = tags.smooth_zigzag_boundary(tp)
     logging.info("removed indices = %s" % removed_indices)
     self.assertEqual(len(removed_indices), 2)
     self.assertEqual(removed_indices, [68, 69])
 def testSmoothZigZagBoundaryMultiZigZag(self):
     tp = json.load(open("emission/tests/data/smoothing_data/caltrain_multi_zigzag.json"))
     (retained_indices, removed_indices) = tags.smooth_zigzag_boundary(tp)
     logging.info("removed indices = %s" % removed_indices)
     # self.assertEqual(len(removed_indices), 23)
     self.assertEqual(removed_indices, [26, 27, 31, 32, 33, 34, 35, 36, 37, 38, 39, 44, 45, 57, 58, 60, 64, 65, 66, 67, 68])