aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test/GazeAnalysis
diff options
context:
space:
mode:
authorThéo de la Hogue2023-05-10 11:16:04 +0200
committerThéo de la Hogue2023-05-10 11:16:04 +0200
commit0abc57e6ee22ec6018a4c0799bbf499fa7749877 (patch)
tree2346ff86cef90384da57524797e46ec9126f15fe /src/argaze.test/GazeAnalysis
parentd0d05aed72759b0fcbb15ed3895636ef3c0c2611 (diff)
downloadargaze-0abc57e6ee22ec6018a4c0799bbf499fa7749877.zip
argaze-0abc57e6ee22ec6018a4c0799bbf499fa7749877.tar.gz
argaze-0abc57e6ee22ec6018a4c0799bbf499fa7749877.tar.bz2
argaze-0abc57e6ee22ec6018a4c0799bbf499fa7749877.tar.xz
Renaming file.
Diffstat (limited to 'src/argaze.test/GazeAnalysis')
-rw-r--r--src/argaze.test/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py32
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