aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2024-01-10 16:39:44 +0100
committerThéo de la Hogue2024-01-10 16:39:44 +0100
commitc9fcffb79e442c2554f028a64e59fca7042b1886 (patch)
tree3c33a3049142e0d34db5778acf242ac3c08597d5
parentf465a5be46f18d6df66c7cca90275d412c5ea1fe (diff)
downloadargaze-c9fcffb79e442c2554f028a64e59fca7042b1886.zip
argaze-c9fcffb79e442c2554f028a64e59fca7042b1886.tar.gz
argaze-c9fcffb79e442c2554f028a64e59fca7042b1886.tar.bz2
argaze-c9fcffb79e442c2554f028a64e59fca7042b1886.tar.xz
Documenting TimestampedGazeStatus class.
-rw-r--r--src/argaze/GazeFeatures.py19
1 files 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)