diff options
-rw-r--r-- | src/argaze/utils/tobii_segment_gaze_metrics_export.py | 10 |
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 |