Skip to content

Commit

Permalink
fixed #174
Browse files Browse the repository at this point in the history
  • Loading branch information
mkassner committed Jul 23, 2015
1 parent 913e24e commit e3b07e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pupil_src/shared_modules/offline_marker_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def save_surface_statsics_to_file(self):

for s in self.surfaces:
gaze_on_srf = s.gaze_on_srf_in_section(section)
gaze_on_srf = set([gp['base']["timestamp"] for gp in gaze_on_srf])
gaze_on_srf = set([gp['base']['timestamp'] for gp in gaze_on_srf])
not_on_any_srf -= gaze_on_srf
csv_writer.writerow( (s.name, len(gaze_on_srf)) )

Expand Down
7 changes: 2 additions & 5 deletions pupil_src/shared_modules/offline_reference_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,8 @@ def gaze_on_srf_in_section(self,section=slice(0,None)):
return []
gaze_on_srf = []
for frame_idx,c_e in enumerate(self.cache[section]):
frame_idx+=section.start
if c_e:
#c_e['gaze_on_srf'] is list of gaze points
# each defined as {'norm_pos':(gaze_points_on_srf[0],gaze_points_on_srf[1]),'timestamp':g_p['timestamp'] }
# and sum of gazepoints that are on srf meaning 0<= x,y <=1
gaze_on_srf += [gp for gp in self.gaze_on_srf_by_frame_idx(frame_idx,c_e['m_from_screen']) if (0<= gp['norm_pos'][0] <=1 and 0<= gp['norm_pos'][1] <=1) ]

gaze_on_srf += [gp for gp in self.gaze_on_srf_by_frame_idx(frame_idx,c_e['m_from_screen']) if gp['on_srf']]
return gaze_on_srf

0 comments on commit e3b07e5

Please sign in to comment.