aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2022-04-13 17:05:31 +0200
committerThéo de la Hogue2022-04-13 17:05:31 +0200
commit3bf7254b9967ab31bb016944bdc232839dbf3604 (patch)
treea97fe2df7702098c713c09bb6de9e5b0514d3828
parent30e13e7fa06895fee6b089498840c688a69ef850 (diff)
downloadargaze-3bf7254b9967ab31bb016944bdc232839dbf3604.zip
argaze-3bf7254b9967ab31bb016944bdc232839dbf3604.tar.gz
argaze-3bf7254b9967ab31bb016944bdc232839dbf3604.tar.bz2
argaze-3bf7254b9967ab31bb016944bdc232839dbf3604.tar.xz
Refactoring output path managment
-rw-r--r--src/argaze/utils/export_tobii_segment_aruco_rois.py1
-rw-r--r--src/argaze/utils/export_tobii_segment_fixations.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/argaze/utils/export_tobii_segment_aruco_rois.py b/src/argaze/utils/export_tobii_segment_aruco_rois.py
index 5314141..a192cf1 100644
--- a/src/argaze/utils/export_tobii_segment_aruco_rois.py
+++ b/src/argaze/utils/export_tobii_segment_aruco_rois.py
@@ -2,6 +2,7 @@
import argparse
import bisect
+import os
from argaze import DataStructures
from argaze import GazeFeatures
diff --git a/src/argaze/utils/export_tobii_segment_fixations.py b/src/argaze/utils/export_tobii_segment_fixations.py
index 8c573ae..4181c77 100644
--- a/src/argaze/utils/export_tobii_segment_fixations.py
+++ b/src/argaze/utils/export_tobii_segment_fixations.py
@@ -18,7 +18,7 @@ def main():
parser.add_argument('-s', '--segment_path', metavar='SEGMENT_PATH', type=str, default=None, help='path to a tobii segment folder')
parser.add_argument('-d', '--dispersion_threshold', metavar='DISPERSION_THRESHOLD', type=int, default=10, help='dispersion threshold in pixel')
parser.add_argument('-t', '--duration_threshold', metavar='DURATION_THRESHOLD', type=int, default=100, help='duration threshold in millisecond')
- parser.add_argument('-o', '--output', metavar='OUT', type=str, default=None, help='destination path (segment folder by default)')
+ parser.add_argument('-o', '--output', metavar='OUT', type=str, default=None, help='destination folder path (segment folder by default)')
args = parser.parse_args()
if args.segment_path != None:
@@ -31,7 +31,7 @@ def main():
os.makedirs(os.path.dirname(args.output))
print(f'{os.path.dirname(args.output)} folder created')
- fixations_filepath = args.output
+ fixations_filepath = f'{args.output}/fixations.json'
else: