aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/gaze_analysis_pipeline/advanced_topics
diff options
context:
space:
mode:
authorThéo de la Hogue2024-01-23 14:54:30 +0100
committerThéo de la Hogue2024-01-23 14:54:30 +0100
commitd904b99cc969c977f911d36cfeb2279544c528e5 (patch)
treeff23c5f0a3279581a86aafe98f86a2894d9f00f1 /docs/user_guide/gaze_analysis_pipeline/advanced_topics
parent8d0a2f7c4f3483aac55603a141e23e1dcc5b0dca (diff)
downloadargaze-d904b99cc969c977f911d36cfeb2279544c528e5.zip
argaze-d904b99cc969c977f911d36cfeb2279544c528e5.tar.gz
argaze-d904b99cc969c977f911d36cfeb2279544c528e5.tar.bz2
argaze-d904b99cc969c977f911d36cfeb2279544c528e5.tar.xz
Defing PipelineStepObject and PipelineStepMethod to assess time execution. Removing exception managment to let the user catch them into the script.
Diffstat (limited to 'docs/user_guide/gaze_analysis_pipeline/advanced_topics')
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md67
1 files changed, 33 insertions, 34 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 837c8ff..9e65c08 100644
--- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
+++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
@@ -71,54 +71,53 @@ Calling [ArFrame.look](../../../argaze.md/#argaze.ArFeatures.ArFrame.look) metho
# Assuming that timestamped gaze positions are available
...
- # Look ArFrame at a timestamped gaze position
- execution_time, exception = ar_frame.look(timestamp, gaze_position).values()
+ try:
- # Do something with calibrated gaze position
- ... ar_frame.gaze_position
+ # Look ArFrame at a timestamped gaze position
+ ar_frame.look(timestamp, gaze_position).values()
- # Check if a gaze movement has been identified
- if ar_frame.gaze_movement.valid and ar_frame.gaze_movement.finished:
+ # Do something with calibrated gaze position
+ ... ar_frame.gaze_position
- # 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):
- ...
+ # Check if a gaze movement has been identified
+ if ar_frame.gaze_movement.valid and ar_frame.gaze_movement.finished:
- # Check if new scan path analysis are available
- if ar_frame.new_analysis_available:
+ # Do something with identified fixation
+ if GazeFeatures.is_fixation(ar_frame.gaze_movement):
+ ...
- # Access to each scan path analyzer
- for analyzer_name, analyzer in ar_frame.scan_path_analyzers.items():
+ # Do something with identified saccade
+ elif GazeFeatures.is_saccade(ar_frame.gaze_movement):
+ ...
- # Do something with analysis results
- ... analyzer.analysis
+ # Check if new scan path analysis are available
+ if ar_frame.new_analysis_available:
- # Iterate over each ArFrame layers
- for name, ar_layer in ar_frame.layers.items():
-
- # Check if new aoi scan path analysis are available
- if ar_layer.new_analysis_available:
-
- # Access to each aoi scan path analyzer
- for analyzer_name, analyzer in ar_layer.aoi_scan_path_analyzers.items():
+ # Access to each scan path analyzer
+ for analyzer_name, analyzer in ar_frame.scan_path_analyzers.items():
# Do something with analysis results
... analyzer.analysis
-```
-Let's understand the meaning of each data.
+ # Iterate over each ArFrame layers
+ for name, ar_layer in ar_frame.layers.items():
+
+ # Check if new aoi scan path analysis are available
+ if ar_layer.new_analysis_available:
-### *execution_times*
+ # Access to each aoi scan path analyzer
+ for analyzer_name, analyzer in ar_layer.aoi_scan_path_analyzers.items():
-A dictionary with each pipeline step execution time.
+ # Do something with analysis results
+ ... analyzer.analysis
-### *exception*
+ # Do something with pipeline exception
+ except Exception as e:
+
+ ...
+```
-A [python Exception](https://docs.python.org/3/tutorial/errors.html#exceptions) object raised during pipeline execution.
+Let's understand the meaning of each data.
### *ar_frame.gaze_position*
@@ -139,7 +138,7 @@ This flag allows to now when new scan path and aoi scan path analysis are availa
### *analyzer.analysis*
-A dict containing all data produced by an analyzer.
+A dictionary containing all data produced by an analyzer.
## Setup ArFrame image parameters