Skip to content

Instantly share code, notes, and snippets.

View papr's full-sized avatar
🏠
Working from home

Pablo Prietz papr

🏠
Working from home
  • Berlin
  • 12:58 (UTC +01:00)
View GitHub Profile
'''
(*)~---------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2017 Pupil Labs
Distributed under the terms of the GNU
Lesser General Public License (LGPL v3.0).
See COPYING and COPYING.LESSER for license details.
---------------------------------------------------------------------------~(*)
'''
from math import ceil
from random import random
from collections import namedtuple, deque
Data_Point = namedtuple('Data_Point', ['arrival', 'value'])
import numpy as np
class Bucket(object):
__slots__ = ['arrival', 'value']
import argparse
from os import listdir
from os.path import isfile, join, splitext
from glob import glob
import numpy as np
from scipy.interpolate import UnivariateSpline
def correct_timesync_offset(ts, name):
time_var = ts.var()
@papr
papr / README.md
Last active June 20, 2018 09:28
Demo code for the pupil labs workshop at ETRA 2018

Pupil Labs Workshop Demo Code

Dependencies

These instructions assume that the dependencies for running Pupil applications from source are already installed. You will have to install the pyglui etra branch in order to run the visualization:

git clone https://github.com/pupil-labs/pyglui/ --branch etra
cd pylgui
import logging
from plugin import Plugin
DEPTH_FRAME_KEY = 'depth_frame'
logger = logging.getLogger(__name__)
class Depth_Frame_Accessor(Plugin):
def recent_events(self, events):
if DEPTH_FRAME_KEY in events:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
'''
(*)~----------------------------------------------------------------------------------
Pupil Helpers
Copyright (C) 2012-2016 Pupil Labs
Distributed under the terms of the GNU Lesser General Public License (LGPL v3.0).
License details are in the file license.txt, distributed as part of this software.
----------------------------------------------------------------------------------~(*)
'''
import logging
from time import time
from plugin import Plugin
logger = logging.getLogger(__name__)
class Unix_Time_Sync(Plugin):
def __init__(self, g_pool):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.