aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-11-24 09:18:02 +0100
committerThéo de la Hogue2022-11-24 09:18:02 +0100
commitb16e123a4ac0504dabf99ec466816645ce4d19c9 (patch)
tree800cf675bff10de36e9f37e6723cfca8e02724df /src
parent5542f6e020539363d9178128055f8087b10e7ed8 (diff)
downloadargaze-b16e123a4ac0504dabf99ec466816645ce4d19c9.zip
argaze-b16e123a4ac0504dabf99ec466816645ce4d19c9.tar.gz
argaze-b16e123a4ac0504dabf99ec466816645ce4d19c9.tar.bz2
argaze-b16e123a4ac0504dabf99ec466816645ce4d19c9.tar.xz
Ignoring non valid position.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/argaze/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py b/src/argaze/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py
index 401c6d8..4fd5aab 100644
--- a/src/argaze/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py
+++ b/src/argaze/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py
@@ -89,9 +89,8 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier):
# select timestamped gaze position until a duration threshold
ts_start, gaze_position_start = remaining_ts_gaze_positions.pop_first()
- # Invalid start position
+ # Ignore non valid start position
if not gaze_position_start.valid:
-
self.__ts_gaze_positions.pop_first()
continue
@@ -104,7 +103,7 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier):
while (ts_next - ts_start) < self.duration_threshold:
# Ignore non valid position
- # TODO ? Should we consider invalid position to not break fixation ?
+ # Should we consider invalid position to not break fixation ?
if gaze_position_next.valid:
# Store selected position
@@ -141,8 +140,10 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier):
# Select next gaze position
ts_next, gaze_position_next = remaining_ts_gaze_positions.first
- # Invalid next position
+ # Ignore non valid position
+ # Should we consider invalid position to not break fixation ?
if not gaze_position_next.valid:
+ remaining_ts_gaze_positions.pop_first()
continue
ts_gaze_positions_extension[ts_next] = gaze_position_next