diff options
Diffstat (limited to 'src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py')
-rw-r--r-- | src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py b/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py index 80873fe..7909362 100644 --- a/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py +++ b/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py @@ -59,7 +59,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): max_time = 0.1 ts_gaze_positions = build_gaze_fixation(size, center, dispersion, start_time, min_time, max_time) - gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(dispersion_threshold=dispersion, duration_threshold=min_time*2) + gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(dispersion_threshold=dispersion, duration_threshold=max_time*2) ts_fixations, ts_saccades, ts_unknown, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) # Check result size @@ -92,7 +92,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): ts_gaze_positions = ts_gaze_positions_A.append(ts_gaze_positions_B) - gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(dispersion_threshold=dispersion, duration_threshold=min_time*2) + gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(dispersion_threshold=dispersion, duration_threshold=max_time*2) ts_fixations, ts_saccades, ts_unknown, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) # Check result size @@ -104,7 +104,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): # Check first fixation ts, fixation = ts_fixations.pop_first() - self.assertEqual(len(fixation.positions.keys()), size) + self.assertEqual(len(fixation.positions.keys()), size-1) self.assertLessEqual(fixation.dispersion, dispersion) self.assertGreaterEqual(fixation.duration, size * min_time) self.assertLessEqual(fixation.duration, size * max_time) @@ -119,7 +119,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): # Check second fixation ts, fixation = ts_fixations.pop_first() - self.assertEqual(len(fixation.positions.keys()), size) + self.assertEqual(len(fixation.positions.keys()), size-1) self.assertLessEqual(fixation.dispersion, dispersion) self.assertGreaterEqual(fixation.duration, size * min_time) self.assertLessEqual(fixation.duration, size * max_time) @@ -137,7 +137,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): ts_gaze_positions = build_gaze_fixation(size, center, dispersion, start_time, min_time, max_time, validity) - gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(dispersion_threshold=dispersion, duration_threshold=min_time*2) + gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(dispersion_threshold=dispersion, duration_threshold=max_time*2) ts_fixations, ts_saccades, ts_unknown, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) # Check result size @@ -198,7 +198,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): ts_gaze_positions = ts_gaze_positions_A.append(ts_gaze_positions_B) - gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(dispersion_threshold=dispersion, duration_threshold=min_time*2) + gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(dispersion_threshold=dispersion, duration_threshold=max_time*2) ts_fixations, ts_saccades, ts_unknown, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) # Check result size |