aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-04-06 13:24:37 +0200
committerThéo de la Hogue2022-04-06 13:24:37 +0200
commit20f79d5ad1e124c7774cfbc9bd7a1abf64da78de (patch)
treee44ad16f0e6e8c7ea6b42d740483e460d8222ab3 /src
parente8a0c6fbc19482923f40cb24f9406bee6e9adc80 (diff)
downloadargaze-20f79d5ad1e124c7774cfbc9bd7a1abf64da78de.zip
argaze-20f79d5ad1e124c7774cfbc9bd7a1abf64da78de.tar.gz
argaze-20f79d5ad1e124c7774cfbc9bd7a1abf64da78de.tar.bz2
argaze-20f79d5ad1e124c7774cfbc9bd7a1abf64da78de.tar.xz
Removing useless script
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/synchronise_timestamped_data.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/argaze/utils/synchronise_timestamped_data.py b/src/argaze/utils/synchronise_timestamped_data.py
deleted file mode 100644
index 0c22072..0000000
--- a/src/argaze/utils/synchronise_timestamped_data.py
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
- # Synchronise video and gaze
- vts_ts, vts = tobii_vts.pop_first()
- vts_offset = (vts_ts - vts.vts) / 1000
-
- print(f'Init >>> vts_offset = {vts_offset}')
-
- last_gaze_position_index = -1
- closest_gaze_position_ts, closest_gaze_position = None, None
-
- last_fixation_index = -1
- closest_fixation_ts, closest_fixation = None, None
-
- for frame_ts, frame in tobii_segment_video.frames():
-
- frame_ts = frame_ts / 1000
-
- if frame_ts > vts.vts / 1000:
- if len(tobii_vts) > 0:
- vts_ts, vts = tobii_vts.pop_first()
- vts_offset = (vts_ts - vts.vts) / 1000
- print(f'{frame_ts / 1000} >>> New vts_offset = {vts_offset / 1000}')
-
- # Find closest gaze position
- closest_index = bisect.bisect_left(list(generic_ts_gaze_positions.keys()), frame_ts + vts_offset) - 1
- if closest_index > last_gaze_position_index:
-
- # pop data until closest_index
- while last_gaze_position_index <= closest_index:
- closest_gaze_position_ts, closest_gaze_position = generic_ts_gaze_positions.pop_first()
- last_gaze_position_index += 1
-
- print(f'{frame_ts / 1000} *** New closest gaze position: index = {closest_index}, ts = {closest_gaze_position_ts / 1000}, {closest_gaze_position}')
-
- # Find closest fixation
- closest_index = bisect.bisect_left(list(fixation_analyser.fixations.keys()), frame_ts + vts_offset) - 1
- if closest_index > last_fixation_index:
-
- # pop data until closest_index
- while last_fixation_index <= closest_index:
- closest_ts, closest_fixation = fixation_analyser.fixations.pop_first()
- last_fixation_index += 1
-
- print(f'{frame_ts / 1000} /// New closest fixation: index= {closest_index}, ts = {closest_ts / 1000}, {closest_fixation}') \ No newline at end of file