Skip to content

Commit

Permalink
Merge pull request #1744 from pupil-labs/fixation_detector_fixes
Browse files Browse the repository at this point in the history
Remove calibration fixation boost
  • Loading branch information
Patrick Faion authored Nov 21, 2019
2 parents 72163d0 + cb650e0 commit ff86b2e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pupil_src/shared_modules/fixation_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ def recent_events(self, events):
age_threshold = ts_newest - self.min_duration / 1000.0
# pop elements until only one element below the age threshold remains:
while self.history[1]["timestamp"] < age_threshold:
self.history.popleft() # remove outdated gaze points
del self.history[0] # remove outdated gaze points

except IndexError:
pass
Expand Down

0 comments on commit ff86b2e

Please sign in to comment.