From 09d1adae9d002a97014838297b73d3957a5d3e6b Mon Sep 17 00:00:00 2001 From: Dominic Canare Date: Fri, 11 Oct 2024 03:20:05 -0400 Subject: [PATCH] Detect missing saccades and re-run detector if needed --- pupil_src/shared_modules/fixation_detector.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pupil_src/shared_modules/fixation_detector.py b/pupil_src/shared_modules/fixation_detector.py index be3845e4..a839f4dd 100644 --- a/pupil_src/shared_modules/fixation_detector.py +++ b/pupil_src/shared_modules/fixation_detector.py @@ -518,6 +518,9 @@ def save_offline_data(self): ) def load_offline_data(self): + if not os.path.isfile(os.path.join(self.data_dir, "saccades.csv")): + raise FileNotFoundError() + path_stop_ts = os.path.join(self.data_dir, "fixations_stop_timestamps.npy") fixation_stop_ts = np.load(path_stop_ts) path_meta = os.path.join(self.data_dir, "fixations.meta")