diff --git a/pupil_src/player/exporter.py b/pupil_src/player/exporter.py index 9cc4bdd0c0..5836b3e2a4 100644 --- a/pupil_src/player/exporter.py +++ b/pupil_src/player/exporter.py @@ -151,7 +151,6 @@ def export(should_terminate,frames_to_export,current_frame, rec_dir,user_dir,sta g.pupil_positions_by_frame = correlate_data(pupil_list,g.timestamps) g.gaze_positions_by_frame = correlate_data(gaze_list,g.timestamps) g.fixations_by_frame = [[] for x in g.timestamps] #populated by the fixation detector plugin - g.fixations_by_frame = [[] for x in g.timestamps] #populated by the fixation detector plugin #add plugins g.plugins = Plugin_List(g,plugin_by_name,plugin_initializers) diff --git a/pupil_src/player/main.py b/pupil_src/player/main.py index ccd1585311..41fa919645 100644 --- a/pupil_src/player/main.py +++ b/pupil_src/player/main.py @@ -270,7 +270,7 @@ def purge_plugins(): g_pool.gui = ui.UI() g_pool.gui.scale = session_settings.get('gui_scale',1) g_pool.main_menu = ui.Growing_Menu("Settings",pos=(-350,20),size=(300,400)) - g_pool.main_menu.append(ui.Button("quit",lambda:glfwSetWindowShouldClose(main_window,True))) + g_pool.main_menu.append(ui.Button("Close Pupil Player",lambda:glfwSetWindowShouldClose(main_window,True))) g_pool.main_menu.append(ui.Slider('scale',g_pool.gui, setter=set_scale,step = .05,min=0.75,max=2.5,label='Interface Size')) g_pool.main_menu.append(ui.Info_Text('Player Version: %s'%g_pool.version)) g_pool.main_menu.append(ui.Info_Text('Recording Version: %s'%rec_version)) diff --git a/pupil_src/player/scan_path.py b/pupil_src/player/scan_path.py index 82ba725f4f..c69609c174 100644 --- a/pupil_src/player/scan_path.py +++ b/pupil_src/player/scan_path.py @@ -13,7 +13,6 @@ import numpy as np from pyglui import ui from methods import denormalize,normalize -from copy import deepcopy import logging logger = logging.getLogger(__name__) @@ -91,8 +90,7 @@ def update(self,frame,events): #update info for next frame. self.prev_gray = gray_img self.prev_frame_idx = frame.index - # copy the data/contents of recent_gaze_positions don't make a reference - self.past_gaze_positions = deepcopy(events['gaze_positions']) + self.past_gaze_positions = events['gaze_positions'] def init_gui(self): # initialize the menu diff --git a/pupil_src/shared_modules/offline_marker_detector.py b/pupil_src/shared_modules/offline_marker_detector.py index 05f4c8e45a..3caee5c58f 100644 --- a/pupil_src/shared_modules/offline_marker_detector.py +++ b/pupil_src/shared_modules/offline_marker_detector.py @@ -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)) ) diff --git a/pupil_src/shared_modules/offline_reference_surface.py b/pupil_src/shared_modules/offline_reference_surface.py index d1449c6a7e..97c9e43460 100644 --- a/pupil_src/shared_modules/offline_reference_surface.py +++ b/pupil_src/shared_modules/offline_reference_surface.py @@ -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