Giter VIP home page Giter VIP logo

pupil-lib-matlab's Introduction

Pupil-Lib Epoch Extraction Library

image

There is a python version of this library (export extracted trials as CSV and load them in Matlab if you need to): https://github.com/gmierz/pupil-lib-python

WARNING: The Matlab version of this library will no longer be updated as Matlab is closed-source (limiting our ability to criticize it), not affordable, and restricts access to problem-solving tools for curious folks like yourself. :) (Plus the python version is much more robust).

Currently, this library can be used by running a Pupil Labs binocular eye tracker alongside the server and client implemented in the 'server_client' folder. At the same time, you can run a visual stimulus using Matlab and send event markers to the server from there using the client. These can later be used to segment the data obtained from the eye trackers into trials with the Pupil-Lib library.

The server is implemented in Python and works very well with Pupil Capture (or you can use LSL). To make it work properly, 'synch_epochs.py' will need to be added to the 'pupil_capture_settings/plugins' directory and loaded in Pupil Capture during start up. This gives us access to timestamps that have a known epoch.

The client that is used does not necessarily need to be the one defined in 'server_client' but can be easily implemented in other languages for use in other stimulation modes. It just needs to send data which has the exact same size, 17 characters for the timestamps (including the '.'), 3 for the name, and 3 for the order for a total of 23 digits.

This library is now compatible with XDF data obtained from the use of the Pupil Labs LSL plugin and a marker outlet (from the 'server_client' folder) running in matlab (or others as needed). The XDF data can be loaded with the 'load_xdf' argument in the 'pupil_load' function.

Dependencies:

  • Pupil Labs binocular eye tracker: https://pupil-labs.com/ .
  • Lab Streaming Library (LSL): https://code.google.com/archive/p/labstreaminglayer/ . The version contained in 'liblsl-1.04.zip' in the downloads page is known to work with the Matlab marker inlet function.
  • LabRecorder: ftp://sccn.ucsd.edu/pub/software/LSL/Apps/ . This version contained in 'LabRecorder-1.12c.zip' is known to work with the Pupil Labs eye tracker and produces compatible XDF files.
  • Pupil Labs LSL Plugin: https://pupil-labs.com/blog/2016-11/pupil-plugin-for-lab-streaming-layer/ . Follow their instructions to get it working. I had to use the source code in the Lab Streaming Library repo to be able to properly produce the 'pylsl' folder. What helped the most here was running the script 'get_deps.py' which will fill the 'pylsl' folder with needed files. This can be done before or after the 'build' phase.

TODO:

  • Use other forms of data other than just 3D pupil diameter.
  • Finish Python version of the library.
  • Complete testing implementation.
  • Complete viewer implementation.

Feel free to mention any other features that should be added or are needed and let me know if you find any bugs by using the Github issues page. You can also mention that you are using it in that page or by e-mailing me.

Also, feel free to contact me if there are any questions about the library.

pupil-lib-matlab's People

Contributors

gmierz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

annaisdevil

pupil-lib-matlab's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.