aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-12-13 18:41:10 +0100
committerThéo de la Hogue2022-12-13 18:41:10 +0100
commit0e128917d7a17585f971e04d0345ca08839cf4bd (patch)
tree8868f9f582401b51410069dc77477d180567934e /src
parent6839eebf20eb8563c10f4a8d794dba0ff6036457 (diff)
downloadargaze-0e128917d7a17585f971e04d0345ca08839cf4bd.zip
argaze-0e128917d7a17585f971e04d0345ca08839cf4bd.tar.gz
argaze-0e128917d7a17585f971e04d0345ca08839cf4bd.tar.bz2
argaze-0e128917d7a17585f971e04d0345ca08839cf4bd.tar.xz
Fixing exploit_explore_ratio export.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/tobii_segment_gaze_metrics_export.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/argaze/utils/tobii_segment_gaze_metrics_export.py b/src/argaze/utils/tobii_segment_gaze_metrics_export.py
index 2935442..848f119 100644
--- a/src/argaze/utils/tobii_segment_gaze_metrics_export.py
+++ b/src/argaze/utils/tobii_segment_gaze_metrics_export.py
@@ -215,14 +215,14 @@ def main():
period_metrics['movements_duration_ratio (%)'] = movements_duration_sum / period_duration * 100
# Analyse exploit/explore
- if not saccades_exist and not movements_exist:
-
- period_metrics['exploit_explore_ratio'] = None
-
- else:
+ if saccades_duration_sum != 0.0 or movements_duration_sum != 0.0:
period_metrics['exploit_explore_ratio'] = fixations_duration_sum / (saccades_duration_sum + movements_duration_sum)
+
+ else:
+ period_metrics['exploit_explore_ratio'] = None
+
# Append period metrics
ts_metrics[int(period_start_ts * 1e-3)] = period_metrics