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:12 (UTC +01:00)
View GitHub Profile
@papr
papr / custom_data_example.py
Created July 10, 2020 08:24
Example Pupil Capture plugin that publishes custom data and stores it during a recording.
from plugin import Plugin
CUSTOM_TOPIC = "custom_topic"
class CustomDataExample(Plugin):
def recent_events(self, events):
custom_datum = {
"topic": CUSTOM_TOPIC,
"timestamp": self.g_pool.get_timestamp(), # Timestamp in pupil time
@papr
papr / load_pldata_files.py
Created June 23, 2020 15:13
Externalized examples to read Pupil Core recording data. Code taken from https://github.com/pupil-labs/pupil
import os
import collections
import msgpack
import numpy as np
PLData = collections.namedtuple("PLData", ["data", "timestamps", "topics"])
@papr
papr / monitor_network.ipynb
Created May 13, 2020 13:36
Replay HMD recording
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@papr
papr / frame_index.py
Created April 2, 2020 09:32
Pupil Player plugin that renders the current scene video frame index into the scene video
import logging
import cv2
from plugin import Plugin
logger = logging.getLogger(__name__)
class Frame_Index(Plugin):
@papr
papr / vis_hemianopsia.py
Last active April 1, 2020 10:42
Pupil Player plugin to visualize left/right hemianopsia
import enum
import cv2
from plugin import Visualizer_Plugin_Base
import numpy as np
from pyglui import ui
from methods import denormalize
import logging
import pathlib
import numpy as np
import OpenGL.GL as gl
from pyglui import ui, pyfontstash
from pyglui.cygl import utils as cygl_utils
import gl_utils
from plugin import Plugin
from pupil_recording import PupilRecording
@papr
papr / surface_data_extraction.ipynb
Created November 27, 2019 21:17
Extract recorded "gaze positions on surface"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
(*)~---------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2019 Pupil Labs
Distributed under the terms of the GNU
Lesser General Public License (LGPL v3.0).
See COPYING and COPYING.LESSER for license details.
---------------------------------------------------------------------------~(*)
"""
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.