diff options
-rw-r--r-- | src/argaze/GazeAnalysis/DispersionBasedGazeMovementIdentifier.py | 9 |
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 |