diff options
author | Théo de la Hogue | 2022-12-09 23:05:06 +0100 |
---|---|---|
committer | Théo de la Hogue | 2022-12-09 23:05:06 +0100 |
commit | e7b30f6cfd9efa1bb63f449ab27aae2c6939f5ba (patch) | |
tree | 6ab64309cf655ad516c42dbb6e9edbc8c10e2568 | |
parent | a9c7ba832d26b869aa442e4665f38295b311aed5 (diff) | |
download | argaze-e7b30f6cfd9efa1bb63f449ab27aae2c6939f5ba.zip argaze-e7b30f6cfd9efa1bb63f449ab27aae2c6939f5ba.tar.gz argaze-e7b30f6cfd9efa1bb63f449ab27aae2c6939f5ba.tar.bz2 argaze-e7b30f6cfd9efa1bb63f449ab27aae2c6939f5ba.tar.xz |
Handling unknown movements.
-rw-r--r-- | src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py b/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py index 0ddebc6..80873fe 100644 --- a/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py +++ b/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py @@ -60,11 +60,12 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): 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) - ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) + ts_fixations, ts_saccades, ts_unknown, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) # Check result size self.assertEqual(len(ts_fixations), 1) self.assertEqual(len(ts_saccades), 0) + self.assertEqual(len(ts_unknown), 0) self.assertEqual(len(ts_status), size) # Check fixation @@ -92,11 +93,12 @@ 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) - ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) + ts_fixations, ts_saccades, ts_unknown, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) # Check result size self.assertEqual(len(ts_fixations), 2) self.assertEqual(len(ts_saccades), 1) + self.assertEqual(len(ts_unknown), 0) self.assertEqual(len(ts_status), size*2) # Check first fixation @@ -136,11 +138,12 @@ 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) - ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) + ts_fixations, ts_saccades, ts_unknown, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) # Check result size self.assertEqual(len(ts_fixations), 1) self.assertEqual(len(ts_saccades), 0) + self.assertEqual(len(ts_unknown), 0) self.assertEqual(len(ts_status), size-2) # Check fixation @@ -196,11 +199,12 @@ 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) - ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) + ts_fixations, ts_saccades, ts_unknown, ts_status = gaze_movement_identifier.identify(ts_gaze_positions) # Check result size self.assertEqual(len(ts_fixations), 1) self.assertEqual(len(ts_saccades), 0) + self.assertEqual(len(ts_unknown), 0) self.assertEqual(len(ts_status), size*2) # Check unique fixation |