From 9773ae5a0811f56950a062fbd8b3063e5698d02a Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 31 May 2023 16:03:02 +0200 Subject: Improve comments. --- src/argaze/GazeAnalysis/VelocityThresholdIdentification.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.1