Skip to content

Commit

Permalink
Filter pupil data by pupil detector topic
Browse files Browse the repository at this point in the history
  • Loading branch information
romanroibu authored and papr committed May 26, 2020
1 parent b5796d6 commit 8ee9faf
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pupil_src/shared_modules/system_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,12 @@ def recent_events(self, events):
# update pupil graphs
if "frame" not in events or self.idx != events["frame"].index:
for p in events["pupil"]:
if "2d" in p["method"]: # TODO: Use detector topic tag
# update confidence graph
cg = self.conf0_graph if p["id"] == 0 else self.conf1_graph
cg.add(p["confidence"])
if "3d" in p["method"]: # TODO: Use detector topic tag
# update diameter graph
dg = self.dia0_graph if p["id"] == 0 else self.dia1_graph
dg.add(p.get("diameter_3d", 0.0))
if p["topic"] == "pupil.0.2d":
assert p["id"] == 0 #sanity check
self.conf0_graph.add(p["confidence"])
if p["topic"] == "pupil.1.2d":
assert p["id"] == 1 #sanity check
self.conf1_graph.add(p["confidence"])

# update wprld fps graph
if "frame" in events:
Expand Down

0 comments on commit 8ee9faf

Please sign in to comment.