aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/argaze/GazeAnalysis/VelocityThresholdIdentification.py')
-rw-r--r--src/argaze/GazeAnalysis/VelocityThresholdIdentification.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
index 7d6c7b2..7131373 100644
--- a/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
+++ b/src/argaze/GazeAnalysis/VelocityThresholdIdentification.py
@@ -133,7 +133,7 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier):
# Ignore non valid gaze position
if not gaze_position.valid:
- return None if not terminate else self.current_fixation
+ return GazeFeatures.UnvalidGazeMovement() if not terminate else self.current_fixation
# Store first valid position
if self.__last_ts < 0:
@@ -211,6 +211,9 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier):
return self.current_fixation
+ # Always return unvalid gaze movement at least
+ return GazeFeatures.UnvalidGazeMovement()
+
@property
def current_fixation(self) -> FixationType:
@@ -218,9 +221,15 @@ class GazeMovementIdentifier(GazeFeatures.GazeMovementIdentifier):
return Fixation(self.__fixation_positions)
+ # Always return unvalid gaze movement at least
+ return GazeFeatures.UnvalidGazeMovement()
+
@property
def current_saccade(self) -> SaccadeType:
if len(self.__saccade_positions) > 0:
return Saccade(self.__saccade_positions)
+
+ # Always return unvalid gaze movement at least
+ return GazeFeatures.UnvalidGazeMovement()