From 62e6c081b26141add3d2b6fe2a335f7e14cee861 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 19 Sep 2023 15:47:51 +0200 Subject: Replacing filter_in_progress_fixation by filter_in_progress_identification. --- .../advanced_topics/scripting.md | 2 +- src/argaze/ArFeatures.py | 22 +++++++++++----------- src/argaze/GazeAnalysis/DeviationCircleCoverage.py | 2 +- 3 files changed, 13 insertions(+), 13 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 2db69fc..81efa40 100644 --- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md +++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md @@ -110,7 +110,7 @@ Let's understand the meaning of each returned data. 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). -This could also be the current gaze movement if [ArFrame.filter_in_progress_fixation](../../../argaze.md/#argaze.ArFeatures.ArFrame) attribute is false. +This could also be the current gaze movement if [ArFrame.filter_in_progress_identification](../../../argaze.md/#argaze.ArFeatures.ArFrame) attribute is false. 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. diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py index 18fb430..63768ec 100644 --- a/src/argaze/ArFeatures.py +++ b/src/argaze/ArFeatures.py @@ -528,7 +528,7 @@ class ArFrame(): name: name of the frame size: defines the dimension of the rectangular area where gaze positions are projected. gaze_movement_identifier: gaze movement identification algorithm - filter_in_progress_fixation: ignore in progress fixation + filter_in_progress_identification: ignore in progress gaze movement identification scan_path: scan path object scan_path_analyzers: dictionary of scan path analyzers heatmap: heatmap object @@ -541,7 +541,7 @@ class ArFrame(): name: str size: tuple[int] = field(default=(1, 1)) gaze_movement_identifier: GazeFeatures.GazeMovementIdentifier = field(default_factory=GazeFeatures.GazeMovementIdentifier) - filter_in_progress_fixation: bool = field(default=True) + filter_in_progress_identification: bool = field(default=True) scan_path: GazeFeatures.ScanPath = field(default_factory=GazeFeatures.ScanPath) scan_path_analyzers: dict = field(default_factory=dict) heatmap: AOIFeatures.Heatmap = field(default_factory=AOIFeatures.Heatmap) @@ -624,11 +624,11 @@ class ArFrame(): # Current fixation matching try: - filter_in_progress_fixation = frame_data.pop('filter_in_progress_fixation') + filter_in_progress_identification = frame_data.pop('filter_in_progress_identification') except KeyError: - filter_in_progress_fixation = True + filter_in_progress_identification = True # Load scan path try: @@ -765,7 +765,7 @@ class ArFrame(): return ArFrame(new_frame_name, \ new_frame_size, \ new_gaze_movement_identifier, \ - filter_in_progress_fixation, \ + filter_in_progress_identification, \ new_scan_path, \ new_scan_path_analyzers, \ new_heatmap, \ @@ -823,7 +823,7 @@ class ArFrame(): gaze_position: gaze position to project Returns: - identified_gaze_movement: identified gaze movement from incoming consecutive timestamped gaze positions if gaze_movement_identifier is instanciated. Current gaze movement if filter_in_progress_fixation is False. + identified_gaze_movement: identified gaze movement from incoming consecutive timestamped gaze positions if gaze_movement_identifier is instanciated. Current gaze movement if filter_in_progress_identification is False. scan_path_analysis: scan path analysis at each new scan step if scan_path is instanciated. layers_analysis: aoi scan path analysis at each new aoi scan step for each instanciated layers aoi scan path. execution_times: all pipeline steps execution times. @@ -909,14 +909,14 @@ class ArFrame(): self.__ts_logs[scan_path_analyzer_module_path][timestamp] = scan_path_analyzer.analysis - # No valid finished gaze movement: optionnaly stop in progress fixation filtering - elif self.gaze_movement_identifier is not None and not self.filter_in_progress_fixation: + # No valid finished gaze movement: optionnaly stop in progress identification filtering + elif self.gaze_movement_identifier is not None and not self.filter_in_progress_identification: - current_fixation = self.gaze_movement_identifier.current_fixation + current_gaze_movement = self.gaze_movement_identifier.current_gaze_movement - if current_fixation.valid: + if current_gaze_movement.valid: - identified_gaze_movement = current_fixation + identified_gaze_movement = current_gaze_movement # Update heatmap if self.heatmap is not None: diff --git a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py index 4cfab72..b59d2df 100644 --- a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py +++ b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py @@ -51,7 +51,7 @@ class AOIMatcher(GazeFeatures.AOIMatcher): for name, aoi in aoi_scene.items(): - # BAD: we use deviation_max attribute which is an atttribute of DispersionThresholdIdentification.Fixation class + # BAD: we use deviation_max attribute which is an attribute of DispersionThresholdIdentification.Fixation class region, _, circle_ratio = aoi.circle_intersection(gaze_movement.focus, gaze_movement.deviation_max) if name not in self.exclude and circle_ratio > 0: -- cgit v1.1