diff options
author | Théo de la Hogue | 2023-07-06 15:50:31 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-07-06 15:50:31 +0200 |
commit | 717452611747ab98a5e94c1f90afcc2854923c68 (patch) | |
tree | 9e03e7d6ede09b1436a9b25957b2def4ae8ed946 /src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py | |
parent | ce43c0e9f100aa0eaec2f39a258e92ffc5cc44a8 (diff) | |
download | argaze-717452611747ab98a5e94c1f90afcc2854923c68.zip argaze-717452611747ab98a5e94c1f90afcc2854923c68.tar.gz argaze-717452611747ab98a5e94c1f90afcc2854923c68.tar.bz2 argaze-717452611747ab98a5e94c1f90afcc2854923c68.tar.xz |
Adding and testing finished attribute to GazeMovement class.
Diffstat (limited to 'src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py')
-rw-r--r-- | src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py b/src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py index 4cf3a81..71a8daf 100644 --- a/src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py +++ b/src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py @@ -127,6 +127,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation.positions.keys()), size-1) self.assertGreaterEqual(fixation.duration, size * min_time) self.assertLessEqual(fixation.duration, size * max_time) + self.assertLessEqual(fixation.finished, True) def test_fixation_and_direct_saccade_identification(self): """Test VelocityThresholdIdentification fixation and saccade identification.""" @@ -158,6 +159,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation.positions.keys()), size-1) self.assertGreaterEqual(fixation.duration, size * min_time) self.assertLessEqual(fixation.duration, size * max_time) + self.assertLessEqual(fixation.finished, True) # Check first saccade ts, saccade = ts_saccades.pop_first() @@ -165,6 +167,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(saccade.positions.keys()), 1) self.assertGreaterEqual(saccade.duration, 0.) self.assertLessEqual(saccade.duration, 0.) + self.assertLessEqual(saccade.finished, True) # Check second fixation ts, fixation = ts_fixations.pop_first() @@ -172,6 +175,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation.positions.keys()), size-1) self.assertGreaterEqual(fixation.duration, size * min_time) self.assertLessEqual(fixation.duration, size * max_time) + self.assertLessEqual(fixation.finished, True) def test_fixation_and_short_saccade_identification(self): """Test VelocityThresholdIdentification fixation and saccade identification.""" @@ -206,6 +210,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation.positions.keys()), size-1) self.assertGreaterEqual(fixation.duration, size * min_time) self.assertLessEqual(fixation.duration, size * max_time) + self.assertLessEqual(fixation.finished, True) # Check first saccade ts, saccade = ts_saccades.pop_first() @@ -213,6 +218,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(saccade.positions.keys()), move+1) self.assertGreaterEqual(saccade.duration, min_time) self.assertLessEqual(saccade.duration, max_time) + self.assertLessEqual(saccade.finished, True) # Check second fixation ts, fixation = ts_fixations.pop_first() @@ -220,6 +226,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation.positions.keys()), size-1) self.assertGreaterEqual(fixation.duration, size * min_time) self.assertLessEqual(fixation.duration, size * max_time) + self.assertLessEqual(fixation.finished, True) def test_invalid_gaze_position(self): """Test VelocityThresholdIdentification fixation and saccade identification with invalid gaze position.""" @@ -248,6 +255,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation.positions.keys()), 6) self.assertGreaterEqual(fixation.duration, 6 * min_time) self.assertLessEqual(fixation.duration, 6 * max_time) + self.assertLessEqual(fixation.finished, True) # Check second fixation ts, fixation = ts_fixations.pop_first() @@ -255,6 +263,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation.positions.keys()), 4) self.assertGreaterEqual(fixation.duration, 4 * min_time) self.assertLessEqual(fixation.duration, 4 * max_time) + self.assertLessEqual(fixation.finished, True) if __name__ == '__main__': |