aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/user_guide/gaze_analysis/gaze_movement.md24
1 files changed, 23 insertions, 1 deletions
diff --git a/docs/user_guide/gaze_analysis/gaze_movement.md b/docs/user_guide/gaze_analysis/gaze_movement.md
index 377e787..932afac 100644
--- a/docs/user_guide/gaze_analysis/gaze_movement.md
+++ b/docs/user_guide/gaze_analysis/gaze_movement.md
@@ -138,4 +138,26 @@ ts_fixations, ts_saccades, ts_status = gaze_movement_identifier.browse(ts_gaze_p
!!! note
[TimeStampedGazeMovements](/argaze/#argaze.GazeFeatures.TimeStampedGazeMovements), [TimeStampedGazeMovements](/argaze/#argaze.GazeFeatures.TimeStampedGazeMovements) and [TimeStampedGazeStatus](/argaze/#argaze.GazeFeatures.TimeStampedGazeStatus) classes inherit from [TimeStampedBuffer](/argaze/#argaze.DataStructures.TimeStampedBuffer) class.
- Read [Timestamped data](../timestamped_data/introduction.md) section to understand all features it provides. \ No newline at end of file
+ Read [Timestamped data](../timestamped_data/introduction.md) section to understand all features it provides.
+
+### Generator method
+
+[GazeMovementIdentifier](/argaze/#argaze.GazeFeatures.GazeMovementIdentifier) can be called with a [TimeStampedGazePositions](/argaze/#argaze.GazeFeatures.TimeStampedGazePositions) buffer in argument to generate gaze movement each time one is identified.
+
+``` python
+# Assuming that timestamped gaze positions are provided through data reading
+
+for ts, gaze_movement in gaze_movement_identifier(ts_gaze_positions):
+
+ # Fixation identified
+ if GazeFeatures.is_fixation(gaze_movement):
+
+ # Do something with each fixation
+ ...
+
+ # Saccade identified
+ elif GazeFeatures.is_saccade(gaze_movement):
+
+ # Do something with each saccade
+ ...
+``` \ No newline at end of file