diff options
Diffstat (limited to 'src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py')
-rw-r--r-- | src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py b/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py index 122e2d8..3de7935 100644 --- a/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py +++ b/src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py @@ -5,7 +5,7 @@ import random import time from argaze import GazeFeatures -from argaze.GazeAnalysis import DispersionBasedGazeMovementIdentifier +from argaze.GazeAnalysis import DispersionThresholdIdentification import numpy @@ -81,11 +81,11 @@ def build_gaze_saccade(size: int, center_A: tuple, center_B: tuple, start_time: return ts_gaze_positions -class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): - """Test DispersionBasedGazeMovementIdentifier class.""" +class TestDispersionThresholdIdentificationClass(unittest.TestCase): + """Test DispersionThresholdIdentification class.""" def test_fixation_identification(self): - """Test DispersionBasedGazeMovementIdentifier fixation identification.""" + """Test DispersionThresholdIdentification fixation identification.""" size = 10 center = (0, 0) @@ -95,7 +95,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): max_time = 0.1 ts_gaze_positions = build_gaze_fixation(size, center, deviation_max, start_time, min_time, max_time) - gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) + gaze_movement_identifier = DispersionThresholdIdentification.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.browse(ts_gaze_positions) # Check result size @@ -112,7 +112,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): self.assertLessEqual(fixation.duration, size * max_time) def test_fixation_and_direct_saccade_identification(self): - """Test DispersionBasedGazeMovementIdentifier fixation and saccade identification.""" + """Test DispersionThresholdIdentification fixation and saccade identification.""" size = 10 center_A = (0, 0) @@ -127,7 +127,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): ts_gaze_positions = ts_gaze_positions_A.append(ts_gaze_positions_B) - gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) + gaze_movement_identifier = DispersionThresholdIdentification.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.browse(ts_gaze_positions) # Check result size @@ -159,7 +159,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): self.assertLessEqual(fixation.duration, size * max_time) ''' def test_fixation_and_short_saccade_identification(self): - """Test DispersionBasedGazeMovementIdentifier fixation and saccade identification.""" + """Test DispersionThresholdIdentification fixation and saccade identification.""" size = 10 move = 2 @@ -179,7 +179,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): ts_gaze_positions = ts_gaze_positions_A.append(ts_move_positions).append(ts_gaze_positions_B) - gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) + gaze_movement_identifier = DispersionThresholdIdentification.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.browse(ts_gaze_positions) # Check result size @@ -211,7 +211,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): self.assertLessEqual(fixation.duration, size * max_time) ''' def test_invalid_gaze_position(self): - """Test DispersionBasedGazeMovementIdentifier fixation and saccade identification with invalid gaze position.""" + """Test DispersionThresholdIdentification fixation and saccade identification with invalid gaze position.""" size = 15 center = (0, 0) @@ -223,7 +223,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): ts_gaze_positions = build_gaze_fixation(size, center, deviation_max, start_time, min_time, max_time, validity) - gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) + gaze_movement_identifier = DispersionThresholdIdentification.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.browse(ts_gaze_positions) # Check result size @@ -256,9 +256,9 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): ts_gaze_positions_B = build_gaze_fixation(size, center_B, deviation_max, start_time, min_time, max_time) ts_gaze_positions_C = build_gaze_fixation(size, center_C, deviation_max, start_time, min_time, max_time) - fixation_A = DispersionBasedGazeMovementIdentifier.Fixation(ts_gaze_positions_A) - fixation_B = DispersionBasedGazeMovementIdentifier.Fixation(ts_gaze_positions_B) - fixation_C = DispersionBasedGazeMovementIdentifier.Fixation(ts_gaze_positions_C) + fixation_A = DispersionThresholdIdentification.Fixation(ts_gaze_positions_A) + fixation_B = DispersionThresholdIdentification.Fixation(ts_gaze_positions_B) + fixation_C = DispersionThresholdIdentification.Fixation(ts_gaze_positions_C) # Check that fixation doesn't overlap self.assertFalse(fixation_A.overlap(fixation_B)) @@ -270,7 +270,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): @unittest.skip("Fixation overlapping identification is broken.") def test_fixation_overlapping_identification(self): - """Test DispersionBasedGazeMovementIdentifier identification when fixations overlap.""" + """Test DispersionThresholdIdentification identification when fixations overlap.""" size = 50 center_A = (-5, 0) @@ -285,7 +285,7 @@ class TestDispersionBasedGazeMovementIdentifierClass(unittest.TestCase): ts_gaze_positions = ts_gaze_positions_A.append(ts_gaze_positions_B) - gaze_movement_identifier = DispersionBasedGazeMovementIdentifier.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) + gaze_movement_identifier = DispersionThresholdIdentification.GazeMovementIdentifier(deviation_max_threshold=deviation_max, duration_min_threshold=max_time*2) ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.browse(ts_gaze_positions) # Check result size |