From 75e5a955730e005da1e55f37efc57786a7447a21 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 11 Jul 2023 16:25:59 +0200 Subject: Documenting TimestampedGazePositions iterator feature. --- docs/user_guide/gaze_analysis/gaze_position.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/user_guide/gaze_analysis/gaze_position.md') diff --git a/docs/user_guide/gaze_analysis/gaze_position.md b/docs/user_guide/gaze_analysis/gaze_position.md index 8856bec..0ca6a12 100644 --- a/docs/user_guide/gaze_analysis/gaze_position.md +++ b/docs/user_guide/gaze_analysis/gaze_position.md @@ -85,3 +85,14 @@ dataframe = pandas.read_csv('gaze_positions.csv', delimiter="\t", low_memory=Fal ts_gaze_positions = GazeFeatures.TimeStampedGazePositions.from_dataframe(dataframe, timestamp = 'Recording timestamp [ms]', x = 'Gaze point X [px]', y = 'Gaze point Y [px]') ``` +### Iterator + +Like [TimeStampedBuffer](../../../argaze/#argaze.DataStructures.TimeStampedBuffer), [TimeStampedGazePositions](../../../argaze/#argaze.GazeFeatures.TimeStampedGazePositions) class provides iterator feature: + +```python +for timestamp, gaze_position in ts_gaze_positions.items(): + + # Do something with gaze positions + ... + +``` -- cgit v1.1