aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/gaze_analysis/gaze_movement.md
diff options
context:
space:
mode:
authorThéo de la Hogue2023-06-15 17:21:47 +0200
committerThéo de la Hogue2023-06-15 17:21:47 +0200
commit053726042d48f68bce7f0bfb4d53c5be097e234d (patch)
tree2ae25db0ba87c7f4ba51203369602018daf0cfc5 /docs/user_guide/gaze_analysis/gaze_movement.md
parenta097f0495ff95a410455a134082bb7a059a8da74 (diff)
downloadargaze-053726042d48f68bce7f0bfb4d53c5be097e234d.zip
argaze-053726042d48f68bce7f0bfb4d53c5be097e234d.tar.gz
argaze-053726042d48f68bce7f0bfb4d53c5be097e234d.tar.bz2
argaze-053726042d48f68bce7f0bfb4d53c5be097e234d.tar.xz
Documenting GazeMovementIdentifier generator method.
Diffstat (limited to 'docs/user_guide/gaze_analysis/gaze_movement.md')
-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