From 17421ad328d4addb3bac1a32fb53488025f8a3f4 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Thu, 21 Mar 2024 23:44:43 +0100 Subject: Fixing gaze analysis demo. --- docs/user_guide/gaze_analysis_pipeline/logging.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'docs/user_guide/gaze_analysis_pipeline/logging.md') diff --git a/docs/user_guide/gaze_analysis_pipeline/logging.md b/docs/user_guide/gaze_analysis_pipeline/logging.md index 9cfe152..6ed497b 100644 --- a/docs/user_guide/gaze_analysis_pipeline/logging.md +++ b/docs/user_guide/gaze_analysis_pipeline/logging.md @@ -40,6 +40,7 @@ Here is *my_frame_logger.py* file: ```python from argaze import DataFeatures +from argaze.GazeAnalysis import Basic from argaze.utils import UtilsFeatures class ScanPathAnalysisLogger(DataFeatures.PipelineStepObserver, UtilsFeatures.FileWriter): @@ -49,10 +50,12 @@ class ScanPathAnalysisLogger(DataFeatures.PipelineStepObserver, UtilsFeatures.Fi if ar_frame.is_analysis_available(): + analysis = ar_frame.analysis() + log = ( timestamp, - ar_frame.analysis['argaze.GazeAnalysis.Basic'].path_duration, - ar_frame.analysis['argaze.GazeAnalysis.Basic'].steps_number + analysis[Basic.ScanPathAnalyzer].path_duration, + analysis[Basic.ScanPathAnalyzer].steps_number ) # Write to file @@ -75,6 +78,7 @@ Here is *my_layer_logger.py* file: ```python from argaze import DataFeatures +from argaze.GazeAnalysis import NGram from argaze.utils import UtilsFeatures class AOIScanPathAnalysisLogger(DataFeatures.PipelineStepObserver, UtilsFeatures.FileWriter): @@ -86,7 +90,7 @@ class AOIScanPathAnalysisLogger(DataFeatures.PipelineStepObserver, UtilsFeatures log = ( timestamp, - ar_layer.analysis['argaze.GazeAnalysis.NGram'].ngrams_count + ar_layer.analysis[NGram.AOIScanPathAnalyzer].ngrams_count ) # Write to file -- cgit v1.1