aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md60
1 files changed, 32 insertions, 28 deletions
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 12e45f7..dc92dd5 100644
--- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
+++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
@@ -73,20 +73,8 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho
try:
- # Look ArFrame at a timestamped gaze position and iterate over analysis
- for element, module, analysis in ar_frame.look(timestamp, gaze_position):
-
- # Ckeck if analysis comes from frame
- if ArFeatures.is_frame(element):
-
- # Do something with scan path module analysis
- ...
-
- # Ckeck if analysis comes from frame
- elif ArFeatures.is_layer(element):
-
- # Do something with aoi scan path module analysis
- ...
+ # Look ArFrame at a timestamped gaze position
+ ar_frame.look(timestamp, gaze_position):
# Do something with calibrated gaze position
... ar_frame.gaze_position
@@ -96,12 +84,30 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho
# Do something with identified fixation
if GazeFeatures.is_fixation(ar_frame.gaze_movement):
+
...
# Do something with identified saccade
elif GazeFeatures.is_saccade(ar_frame.gaze_movement):
+
+ ...
+
+ # Do something with scan path analysis
+ if ar_frame.scan_path_analyzed:
+
+ for scan_path_analyzer_name, scan_path_analysis in ar_frame.scan_path_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:
+
+ for aoi_scan_path_analyzer_name, aoi_scan_path_analysis in ar_layer.aoi_scan_path_analysis():
+
+ ...
+
# Do something with pipeline exception
except Exception as e:
@@ -110,16 +116,6 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho
Let's understand the meaning of each data.
-### *element, module, analysis*
-
-Looking at [ArFrame](../../../argaze.md/#argaze.ArFeatures.ArFrame) leads inner [ArFrame](../../../argaze.md/#argaze.ArFeatures.ArFrame) scan path analyzers and inner [Arlayers](../../../argaze.md/#argaze.ArFeatures.ArLayer) aoi scan path analysis to produce analysis.
-
-The *element* returning analysis can be tested thanks to [ArFeatures.is_frame](../../../argaze.md/#argaze.ArFeatures.is_frame) and [ArFeatures.is_layer](../../../argaze.md/#argaze.ArFeatures.is_layer) functions.
-
-The *module* is the type of scan path or aoi scan path analyzer.
-
-The *analysis* is a dictionnary containing all analysis produced by the module.
-
### *ar_frame.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).
@@ -133,13 +129,21 @@ 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.new_analysis_available* and *ar_layer.new_analysis_available*
+### *ar_frame.scan_path_analyzed*
+
+This flag allows to now when new scan path analysis are available.
+
+### *ar_frame.scan_path_analysis()*
+
+This an iterator to access to all scan path analysis.
+
+### *ar_layer.aoi_scan_path_analyzed*
-This flag allows to now when new scan path and aoi scan path analysis are available.
+This flag allows to now when new aoi scan path analysis are available.
-### *analyzer.analysis*
+### *ar_layer.aoi_scan_path_analysis()*
-A dictionary containing all data produced by an analyzer.
+This an iterator to access to all aoi scan path analysis.
## Setup ArFrame image parameters