From cb650e059b63d52d04f6c25c153c9312bbb08f0f Mon Sep 17 00:00:00 2001 From: Pablo Prietz Date: Thu, 21 Nov 2019 12:16:54 +0100 Subject: [PATCH] Remove calibration speed boosting through fixations Also applies black. Feature was removed since the fixation detector always requires calibrated gaze to work properly. --- .../manual_marker_calibration.py | 2 -- .../screen_marker_calibration.py | 17 ++++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pupil_src/shared_modules/calibration_routines/manual_marker_calibration.py b/pupil_src/shared_modules/calibration_routines/manual_marker_calibration.py index 0f24fe5086..a1477d3ac3 100644 --- a/pupil_src/shared_modules/calibration_routines/manual_marker_calibration.py +++ b/pupil_src/shared_modules/calibration_routines/manual_marker_calibration.py @@ -200,8 +200,6 @@ def recent_events(self, events): ref["screen_pos"] = marker_pos ref["timestamp"] = frame.timestamp self.ref_list.append(ref) - if events.get("fixations", []): - self.counter -= 5 if self.counter <= 0: # last sample before counter done and moving on audio.tink() diff --git a/pupil_src/shared_modules/calibration_routines/screen_marker_calibration.py b/pupil_src/shared_modules/calibration_routines/screen_marker_calibration.py index 1918bcc0b0..becf8e8170 100644 --- a/pupil_src/shared_modules/calibration_routines/screen_marker_calibration.py +++ b/pupil_src/shared_modules/calibration_routines/screen_marker_calibration.py @@ -226,9 +226,14 @@ def open_window(self, title="new_window"): ) self.monitor_idx = 0 monitor = glfwGetMonitors()[self.monitor_idx] - width, height, redBits, blueBits, greenBits, refreshRate = glfwGetVideoMode( - monitor - ) + ( + width, + height, + redBits, + blueBits, + greenBits, + refreshRate, + ) = glfwGetVideoMode(monitor) else: monitor = None width, height = 640, 360 @@ -342,11 +347,9 @@ def recent_events(self, events): # Always save pupil positions self.pupil_list.extend(events["pupil"]) - if on_position and len(self.markers) and events.get("fixations", []): - fixation_boost = 5 + if on_position and len(self.markers): self.screen_marker_state = min( - self.sample_duration + self.lead_in, - self.screen_marker_state + fixation_boost, + self.sample_duration + self.lead_in, self.screen_marker_state, ) # Animate the screen marker