From 50e4598b343c7eb8af5c1619e44cd656d5549d2c Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Thu, 18 Jul 2024 22:51:36 +0200 Subject: Fixing K calculation. --- src/argaze/GazeAnalysis/KCoefficient.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/argaze/GazeAnalysis/KCoefficient.py b/src/argaze/GazeAnalysis/KCoefficient.py index f9218cb..c6f303a 100644 --- a/src/argaze/GazeAnalysis/KCoefficient.py +++ b/src/argaze/GazeAnalysis/KCoefficient.py @@ -48,7 +48,7 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer): for scan_step in scan_path: - durations.append(scan_step.duration) + durations.append(scan_step.fixation_duration) amplitudes.append(scan_step.last_saccade.amplitude) durations = numpy.array(durations) @@ -65,7 +65,7 @@ class ScanPathAnalyzer(GazeFeatures.ScanPathAnalyzer): Ks = [] for scan_step in scan_path: - Ks.append((abs(scan_step.duration - duration_mean) / duration_std) - (abs(scan_step.last_saccade.amplitude - amplitude_mean) / amplitude_std)) + Ks.append((abs(scan_step.fixation_duration - duration_mean) / duration_std) - (abs(scan_step.last_saccade.amplitude - amplitude_mean) / amplitude_std)) self.__K = numpy.array(Ks).mean() @@ -106,7 +106,7 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): for aoi_scan_step in aoi_scan_path: - durations.append(aoi_scan_step.duration) + durations.append(aoi_scan_step.fixation_duration) amplitudes.append(aoi_scan_step.last_saccade.amplitude) durations = numpy.array(durations) @@ -123,7 +123,7 @@ class AOIScanPathAnalyzer(GazeFeatures.AOIScanPathAnalyzer): Ks = [] for aoi_scan_step in aoi_scan_path: - Ks.append((abs(aoi_scan_step.duration - duration_mean) / duration_std) - (abs(aoi_scan_step.last_saccade.amplitude - amplitude_mean) / amplitude_std)) + Ks.append((abs(aoi_scan_step.fixation_duration - duration_mean) / duration_std) - (abs(aoi_scan_step.last_saccade.amplitude - amplitude_mean) / amplitude_std)) self.__K = numpy.array(Ks).mean() -- cgit v1.1