aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-03-28 13:56:30 +0200
committerThéo de la Hogue2022-03-28 13:56:30 +0200
commitce756d0668fa78ceb15bda32d7634917cd2fe2e4 (patch)
tree74ffd13062b3f15283be2d9581dd6660c0b7c829 /src
parentd9072f1bcc69b21869f10dd18946666b8b1c4323 (diff)
downloadargaze-ce756d0668fa78ceb15bda32d7634917cd2fe2e4.zip
argaze-ce756d0668fa78ceb15bda32d7634917cd2fe2e4.tar.gz
argaze-ce756d0668fa78ceb15bda32d7634917cd2fe2e4.tar.bz2
argaze-ce756d0668fa78ceb15bda32d7634917cd2fe2e4.tar.xz
Using _ to create tobii data signature. Using . access in utils example.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/TobiiGlassesPro2/TobiiEntities.py2
-rw-r--r--src/argaze/utils/analyse_tobii_segment_fixations.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/argaze/TobiiGlassesPro2/TobiiEntities.py b/src/argaze/TobiiGlassesPro2/TobiiEntities.py
index 30a966e..475661d 100644
--- a/src/argaze/TobiiGlassesPro2/TobiiEntities.py
+++ b/src/argaze/TobiiGlassesPro2/TobiiEntities.py
@@ -57,7 +57,7 @@ class TobiiSegmentData(DataStructures.DictObject):
return
# convert json data into data object
- data_object_type = '-'.join(json_item.keys())
+ data_object_type = '_'.join(json_item.keys())
data_object = DataStructures.DictObject(data_object_type, **json_item)
# append a dedicated timestamped buffer for each data object type
diff --git a/src/argaze/utils/analyse_tobii_segment_fixations.py b/src/argaze/utils/analyse_tobii_segment_fixations.py
index 3ab080f..ef4ebbb 100644
--- a/src/argaze/utils/analyse_tobii_segment_fixations.py
+++ b/src/argaze/utils/analyse_tobii_segment_fixations.py
@@ -32,12 +32,12 @@ def main():
print(f'Data keys: {tobii_segment_data.keys()}')
# Access to timestamped gaze position data buffer
- tobii_ts_gaze_positions = tobii_segment_data['gidx-l-gp']
+ tobii_ts_gaze_positions = tobii_segment_data.gidx_l_gp
print(f'{len(tobii_ts_gaze_positions)} gaze positions loaded')
# Access to video timestamp index
- tobii_vts = tobii_segment_data['vts']
+ tobii_vts = tobii_segment_data.vts
print(f'{len(tobii_vts)} video timestamps loaded')
for ts, vts in tobii_vts.items():
@@ -62,7 +62,7 @@ def main():
print(f'start time = {ts}, duration = {f.duration}, dispertion = {f.dispersion}, centroid = {f.centroid}')
# TODO : Synchronise video and gaze
- #for ts, frame in tobii_segment_video:
+ #for ts, frame in tobii_segment_video.frames():
#print(ts)