From 166027e1de0e6be20db6ca7e1a443b62c6cfa451 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 6 Feb 2024 17:28:41 +0100 Subject: Setting FileWriter header as tuple to remove space between column names. --- src/argaze/utils/UtilsFeatures.py | 2 +- src/argaze/utils/demo_data/demo_frame_logger.py | 4 ++-- src/argaze/utils/demo_data/demo_layer_logger.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/argaze/utils/UtilsFeatures.py b/src/argaze/utils/UtilsFeatures.py index 76d5f59..da7565b 100644 --- a/src/argaze/utils/UtilsFeatures.py +++ b/src/argaze/utils/UtilsFeatures.py @@ -162,7 +162,7 @@ class FileWriter(): separator: String used to separate elements during tuple to string conversion. """ - def __init__(self, path: str, header: str|tuple, separator: str = ", "): + def __init__(self, path: str, header: str|tuple, separator: str = ','): """Check that folder structure exist and create file then, write header line.""" import os diff --git a/src/argaze/utils/demo_data/demo_frame_logger.py b/src/argaze/utils/demo_data/demo_frame_logger.py index 3448492..025d4d8 100644 --- a/src/argaze/utils/demo_data/demo_frame_logger.py +++ b/src/argaze/utils/demo_data/demo_frame_logger.py @@ -54,8 +54,8 @@ class VideoRecorder(DataFeatures.PipelineStepObserver, UtilsFeatures.VideoWriter # Export loggers instances to register them as pipeline step object observers __observers__ = { - "Fixation logger": FixationLogger(path="_export/logs/fixations.csv", header="Timestamp (ms), Focus (px), Duration (ms), AOI"), - "Scan path analysis logger": ScanPathAnalysisLogger(path="_export/logs/scan_path_metrics.csv", header="Timestamp (ms), Duration (ms), Step, K, NNI, XXR"), + "Fixation logger": FixationLogger(path="_export/logs/fixations.csv", header=("Timestamp (ms)", "Focus (px)", "Duration (ms)", "AOI")), + "Scan path analysis logger": ScanPathAnalysisLogger(path="_export/logs/scan_path_metrics.csv", header=("Timestamp (ms)", "Duration (ms)", "Step", "K", "NNI", "XXR")), "Video recorder": VideoRecorder(path="_export/logs/video.mp4", width=1920, height=1080, fps=15) } diff --git a/src/argaze/utils/demo_data/demo_layer_logger.py b/src/argaze/utils/demo_data/demo_layer_logger.py index de1aea2..1e78375 100644 --- a/src/argaze/utils/demo_data/demo_layer_logger.py +++ b/src/argaze/utils/demo_data/demo_layer_logger.py @@ -29,5 +29,5 @@ class AOIScanPathAnalysisLogger(DataFeatures.PipelineStepObserver, UtilsFeatures # Export loggers instances to register them as pipeline step object observers __observers__ = { - "AOI Scan path analysis logger": AOIScanPathAnalysisLogger(path="_export/logs/aoi_scan_path_metrics.csv", header="Timestamp (ms), Duration (ms), Step, K, LZC") + "AOI Scan path analysis logger": AOIScanPathAnalysisLogger(path="_export/logs/aoi_scan_path_metrics.csv", header=("Timestamp (ms)", "Duration (ms)", "Step", "K", "LZC")) } \ No newline at end of file -- cgit v1.1