Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes for upcoming v1.7 release #1157

Merged
merged 13 commits into from
Apr 20, 2018
3 changes: 2 additions & 1 deletion pupil_src/launchables/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def stop_eye_process(eye_id):
from pupil_remote import Pupil_Remote
from pupil_groups import Pupil_Groups
from frame_publisher import Frame_Publisher
from blink_detection import Blink_Detection
from service_ui import Service_UI

logger.info('Application Version: {}'.format(version))
Expand All @@ -119,7 +120,7 @@ def get_timestamp():

# manage plugins
runtime_plugins = import_runtime_plugins(os.path.join(g_pool.user_dir, 'plugins'))
user_launchable_plugins = [Service_UI, Pupil_Groups, Pupil_Remote, Frame_Publisher]+runtime_plugins
user_launchable_plugins = [Service_UI, Pupil_Groups, Pupil_Remote, Frame_Publisher, Blink_Detection]+runtime_plugins
plugin_by_index = runtime_plugins+calibration_plugins+gaze_mapping_plugins+user_launchable_plugins
name_by_index = [p.__name__ for p in plugin_by_index]
plugin_by_name = dict(zip(name_by_index, plugin_by_index))
Expand Down
2 changes: 1 addition & 1 deletion pupil_src/shared_modules/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def export(rec_dir, user_dir, min_data_confidence, start_frame=None, end_frame=N
valid_ext = ('.mp4', '.mkv', '.avi', '.h264', '.mjpeg', '.fake')
video_path = [f for f in glob(os.path.join(rec_dir, "world.*"))
if os.path.splitext(f)[1] in valid_ext][0]
cap = init_playback_source(g_pool, source_path=video_path)
cap = init_playback_source(g_pool, source_path=video_path, timing=None)

timestamps = cap.timestamps

Expand Down
10 changes: 8 additions & 2 deletions pupil_src/shared_modules/fixation_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,18 +242,24 @@ def set_max_duration(new_value):
def jump_next_fixation(_):
cur_idx = self.last_frame_idx
all_idc = [f['mid_frame_index'] for f in self.g_pool.fixations]
if not all_idc:
logger.warning('No fixations available')
return
# wrap-around index
tar_fix = bisect_right(all_idc, cur_idx) % len(all_idc)
self.notify_all({'subject': 'seek_control.should_seek',
'index': self.g_pool.fixations[tar_fix]['mid_frame_index']})
'index': int(self.g_pool.fixations[tar_fix]['mid_frame_index'])})

def jump_prev_fixation(_):
cur_idx = self.last_frame_idx
all_idc = [f['mid_frame_index'] for f in self.g_pool.fixations]
if not all_idc:
logger.warning('No fixations available')
return
# wrap-around index
tar_fix = (bisect_left(all_idc, cur_idx) - 1) % len(all_idc)
self.notify_all({'subject': 'seek_control.should_seek',
'index': self.g_pool.fixations[tar_fix]['mid_frame_index']})
'index': int(self.g_pool.fixations[tar_fix]['mid_frame_index'])})

for help_block in self.__doc__.split('\n\n'):
help_str = help_block.replace('\n', ' ').replace(' ', '').strip()
Expand Down
2 changes: 1 addition & 1 deletion pupil_src/shared_modules/marker_detector_cacher.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def fill_cache(visited_list, video_file_path, q, seek_idx, run, min_marker_perim
from square_marker_detect import detect_markers_robust
aperture = 9
markers = []
cap = init_playback_source(Global_Container(), video_file_path)
cap = init_playback_source(Global_Container(), source_path=video_file_path, timing=None)

def next_unvisited_idx(frame_idx):
try:
Expand Down
126 changes: 0 additions & 126 deletions pupil_src/shared_modules/time_sync_spec.md

This file was deleted.

2 changes: 1 addition & 1 deletion pupil_src/shared_modules/vis_eye_video_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(self, g_pool, eyeid, pos, hdpi_fac=1., hflip=False, vflip=False):
def initliaze_video(self, rec_dir, world_timestamps):
eye_loc = os.path.join(rec_dir, 'eye{}.*'.format(self.eyeid))
try:
self.source = File_Source(Empty(), source_path=glob(eye_loc)[0])
self.source = File_Source(Empty(), source_path=glob(eye_loc)[0], timing=None)
self.current_eye_frame = self.source.get_frame()
except (FileNotFoundError, IndexError):
logger.warning('Video for eye{} was not found or could not be opened.'.format(self.eyeid))
Expand Down