From 1e410097b5fe63f72928610d0ef77b25471bc88c Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Mon, 29 Jan 2024 10:19:26 +0100 Subject: Harmonizing ArFeatures method names. --- .../advanced_topics/scripting.md | 39 +++++++++++++--------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md') diff --git a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md index 12b5dd1..e206a96 100644 --- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md +++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md @@ -76,35 +76,38 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho # Look ArFrame at a timestamped gaze position ar_frame.look(timestamp, gaze_position): - # Do something with calibrated gaze position - ... ar_frame.gaze_position + # Do something with last gaze position + ... ar_frame.last_gaze_position # Check if a gaze movement has been identified - if ar_frame.gaze_movement.valid and ar_frame.gaze_movement.finished: + if ar_frame.last_gaze_movement.valid and ar_frame.last_gaze_movement.finished: # Do something with identified fixation - if GazeFeatures.is_fixation(ar_frame.gaze_movement): + if GazeFeatures.is_fixation(ar_frame.last_gaze_movement): ... # Do something with identified saccade - elif GazeFeatures.is_saccade(ar_frame.gaze_movement): + elif GazeFeatures.is_saccade(ar_frame.last_gaze_movement): ... # Do something with scan path analysis - if ar_frame.scan_path_analyzed: + if ar_frame.analysis_available: - for scan_path_analyzer_name, scan_path_analysis in ar_frame.scan_path_analysis(): + for scan_path_analyzer_name, scan_path_analysis in ar_frame.analysis(): ... # Do something with layers aoi scan path analysis for layer_name, ar_layer in ar_frame.layers.items(): - if ar_layer.aoi_scan_path_analyzed: + # Do something with last looked aoi name + ... ar_frame.last_looked_aoi_name - for aoi_scan_path_analyzer_name, aoi_scan_path_analysis in ar_layer.aoi_scan_path_analysis: + if ar_layer.analysis_available: + + for aoi_scan_path_analyzer_name, aoi_scan_path_analysis in ar_layer.analysis(): ... @@ -116,11 +119,11 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho Let's understand the meaning of each data. -### *ar_frame.gaze_position* +### *ar_frame.last_gaze_position* -This is the calibrated [GazePosition](../../../argaze.md/#argaze.GazeFeatures.GazePosition) returned by [GazePositionCalibrator](../../../argaze.md/#argaze.GazeFeatures.GazePositionCalibrator) if one is instanciated else, it is the given [GazePosition](../../../argaze.md/#argaze.GazeFeatures.GazePosition). +This is the last calibrated [GazePosition](../../../argaze.md/#argaze.GazeFeatures.GazePosition) returned by [GazePositionCalibrator](../../../argaze.md/#argaze.GazeFeatures.GazePositionCalibrator) if one is instanciated else, it is the given [GazePosition](../../../argaze.md/#argaze.GazeFeatures.GazePosition). -### *ar_frame.gaze_movement* +### *ar_frame.last_gaze_movement* A [GazeMovement](../../../argaze.md/#argaze.GazeFeatures.GazeMovement) once it have been identified by [ArFrame.gaze_movement_identifier](../../../argaze.md/#argaze.ArFeatures.ArFrame) object from incoming consecutive timestamped gaze positions. If no gaze movement have been identified, it returns an [UnvalidGazeMovement](../../../argaze.md/#argaze.GazeFeatures.UnvalidGazeMovement). @@ -129,19 +132,23 @@ In that case, the returned gaze movement *finished* flag is false. Then, the returned gaze movement type can be tested thanks to [GazeFeatures.is_fixation](../../../argaze.md/#argaze.GazeFeatures.is_fixation) and [GazeFeatures.is_saccade](../../../argaze.md/#argaze.GazeFeatures.is_saccade) functions. -### *ar_frame.scan_path_analyzed* +### *ar_frame.analysis_available* This flag allows to now when new scan path analysis are available. -### *ar_frame.scan_path_analysis()* +### *ar_frame.analysis()* This an iterator to access to all scan path analysis. -### *ar_layer.aoi_scan_path_analyzed* +### *ar_layer.last_looked_aoi_name* + +The name of the last aoi matching a gaze movement returned by [AoiMatcher](../../../argaze.md/#argaze.GazeFeatures.AoiMatcher) if one is instanciated else, it is a None value. + +### *ar_layer.analysis_available* This flag allows to now when new aoi scan path analysis are available. -### *ar_layer.aoi_scan_path_analysis* +### *ar_layer.analysis()* This an iterator to access to all aoi scan path analysis. -- cgit v1.1