Initial time synchronisation, eye tracker data collection and conversions between separate systems running eye tracking (Linux/Python 2.7) and psychophysical task (Windows/MATLAB).
- Pupil labs eyetracker and software.
- Python 2.7
- msgpack
- zmq
- scipy
- pickle
- time
- Numpy
- Pandas
- tqdm (optional)
- MATLAB (code included), or another TCP client.
To prepare Python environment using Anaconda 4:
conda create -n EyeEnv python=2.7 anaconda
activate EyeEnv
conda install tqdm
-
Creates TCP server for time exchange.
-
Connects to PupilLabs ZMQ server to receive live eye tracker data
-
Pickles eye data to disk.
-
Converts .p to .mat.
-
Subscriptions supported:
- gaze
- surface
- pupil.0, pupil.1
- Connects to TCP server, exchanges current time.
- Launch Pupil Capture, prepare surfaces to track, calibrate etc.
- Launch eye server in Pupil Capture.
- Set parameters in EyeTrackerServer/run.py and run, Python will wait for TCP connection.
- Set parameters in MATLABClient/run.m and run. MATLAB will connect to TCP server and exchange time.
- If time exchange is successful, Python will continue and connect to Pupil Capture server, data collection (to disk) will start automatically.
- Stop execution in Python, if processNow==True, conversion to .mat will run automatically.
To convert already collected data to .mat format (for example, if not set to automatically process after collection), see EyeTrackerServer/process.py
- Add other subscriptions. This can be done in EyeTracker class, conversion methods will also need updating.
- Add live functionality. This requires adding persistent TCP client to EyeTracker that can be monitored by the client. For example, client to check gaze is on surface before starting a trial.
- Add support for cPickle