aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/GazeAnalysis/VelocityThresholdIdentification.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
index 7405ec6..2b29492 100644
--- a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
+++ b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
@@ -217,6 +217,23 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier):
return GazeFeatures.UnvalidGazeMovement()
@property
+ def current_gaze_movement(self) -> GazeMovementType:
+
+ # It shouldn't have a current fixation and a current saccade at the same time
+ assert(not (len(self.__fixation_positions) > 0 and len(self.__saccade_positions) > 0))
+
+ if len(self.__fixation_positions) > 0:
+
+ return Fixation(self.__fixation_positions)
+
+ if len(self.__saccade_positions) > 0:
+
+ return Saccade(self.__saccade_positions)
+
+ # Always return unvalid gaze movement at least
+ return GazeFeatures.UnvalidGazeMovement()
+
+ @property
def current_fixation(self) -> FixationType:
if len(self.__fixation_positions) > 0: