Example #1
0
 def __init__(self, g_pool):
     super().__init__(g_pool)
     self._pupil_changed_announcer = data_changed.Announcer(
         "pupil_positions", g_pool.rec_dir, plugin=self)
     self._pupil_changed_listener = data_changed.Listener("pupil_positions",
                                                          g_pool.rec_dir,
                                                          plugin=self)
     self._pupil_changed_listener.add_observer("on_data_changed",
                                               self._refresh_timelines)
Example #2
0
 def __init__(
     self,
     g_pool,
     max_dispersion=1.50,
     min_duration=80,
     max_duration=220,
     show_fixations=True,
 ):
     super().__init__(g_pool)
     self.max_dispersion = max_dispersion
     self.min_duration = min_duration
     self.max_duration = max_duration
     self.show_fixations = show_fixations
     self.current_fixation_details = None
     self.fixation_data = []
     self.prev_index = -1
     self.bg_task = None
     self.status = ""
     self.data_dir = os.path.join(g_pool.rec_dir, "offline_data")
     self._gaze_changed_listener = data_changed.Listener(
         "gaze_positions", g_pool.rec_dir, plugin=self
     )
     self._gaze_changed_listener.add_observer("on_data_changed", self._classify)
     self._fixations_changed_announcer = data_changed.Announcer(
         "fixations", g_pool.rec_dir, plugin=self
     )
     try:
         self.load_offline_data()
     except (
         FileNotFoundError,
         self.VersionMismatchError,
         self.ConfigMismatchError,
         self.DataMismatchError,
     ) as err:
         logger.debug(f"Offline data not loaded: {err} ({type(err).__name__})")
         self.notify_all(
             {"subject": "fixation_detector.should_recalculate", "delay": 0.5}
         )
 def __init__(self, g_pool):
     super().__init__(g_pool)
     self._gaze_changed_announcer = data_changed.Announcer("gaze_positions",
                                                           g_pool.rec_dir,
                                                           plugin=self)