aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/GazeAnalysis/VelocityThresholdIdentification.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
index 4c97c4c..4883eb0 100644
--- a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
+++ b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
@@ -146,16 +146,18 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier):
# Check if too much time elapsed since last gaze position
if (ts - self.__last_ts) > self.duration_min_threshold:
- # Clear all former gaze positions
+ # Remember last position
self.__last_ts = ts
self.__last_position = gaze_position
# Get last movement
last_movement = self.current_saccade if len(self.__fixation_positions) == 0 else self.current_fixation
+ # Clear all former gaze positions
self.__fixation_positions = GazeFeatures.TimeStampedGazePositions()
self.__saccade_positions = GazeFeatures.TimeStampedGazePositions()
+ # Return last valid movement if exist
return last_movement
# Velocity