diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/GazeAnalysis/Basic.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/argaze/GazeAnalysis/Basic.py b/src/argaze/GazeAnalysis/Basic.py index 03b2878..c57b447 100644 --- a/src/argaze/GazeAnalysis/Basic.py +++ b/src/argaze/GazeAnalysis/Basic.py @@ -22,12 +22,15 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer): super().__init__() + self.__path_duration = 0 self.__steps_number = 0 self.__step_fixation_durations_average = 0 def analyze(self, scan_path: GazeFeatures.ScanPathType): """Analyze scan path.""" + self.__path_duration = scan_path.duration + self.__steps_number = len(scan_path) sum_fixation_durations = 0 @@ -39,6 +42,11 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer): self.__step_fixation_durations_average = sum_fixation_durations / self.__steps_number @property + def path_duration(self) -> float: + + return self.__path_duration + + @property def steps_number(self) -> float: return self.__steps_number @@ -56,12 +64,15 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): super().__init__() + self.__path_duration = 0 self.__steps_number = 0 self.__step_fixation_durations_average = 0 def analyze(self, aoi_scan_path: GazeFeatures.ScanPathType): """Analyze aoi scan path.""" + self.__path_duration = aoi_scan_path.duration + self.__steps_number = len(aoi_scan_path) sum_fixation_durations = 0 @@ -71,6 +82,11 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): sum_fixation_durations += aoi_scan_step.fixation_duration self.__step_fixation_durations_average = sum_fixation_durations / self.__steps_number + + @property + def path_duration(self) -> float: + + return self.__path_duration @property def steps_number(self) -> float: |