From c9fcffb79e442c2554f028a64e59fca7042b1886 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 10 Jan 2024 16:39:44 +0100 Subject: Documenting TimestampedGazeStatus class. --- src/argaze/GazeFeatures.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index bed8576..12cccbc 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -508,9 +508,16 @@ TimeStampedGazeStatusType = TypeVar('TimeStampedGazeStatus', bound="TimeStampedG # Type definition for type annotation convenience class TimeStampedGazeStatus(DataStructures.TimeStampedBuffer): - """Define timestamped buffer to store gaze status.""" + """Define timestamped buffer to store list of gaze statusa. + + !!! note + List of gaze status are required as a gaze position can belongs to two consecutive gaze movements as last and first position. + """ + + def __setitem__(self, key, value: list): + + assert(isinstance(value, list)) - def __setitem__(self, key, value: GazeStatus): super().__setitem__(key, value) class GazeMovementIdentifier(): @@ -550,7 +557,13 @@ class GazeMovementIdentifier(): raise NotImplementedError('current_saccade getter not implemented') def browse(self, ts_gaze_positions: TimeStampedGazePositions) -> Tuple[TimeStampedGazeMovementsType, TimeStampedGazeMovementsType, TimeStampedGazeStatusType]: - """Identify fixations and saccades browsing timestamped gaze positions.""" + """Identify fixations and saccades browsing timestamped gaze positions. + + Returns: + timestamped_fixations: all fixations stored by timestamped. + timestamped_saccades: all saccades stored by timestamped. + timestamped_gaze_status: all gaze status stored by timestamped. + """ assert(type(ts_gaze_positions) == TimeStampedGazePositions) -- cgit v1.1