open-cogsci / eyelinkparser

A parser for EyeLink data files, built on python-datamatrix
GNU General Public License v3.0
20 stars 10 forks source link

Python EyeLinkParser

Sebastiaan Mathôt and contributors
Copyright 2016-2023
http://www.cogsci.nl/smathot

About

The python-eyelinkparser module provides a framework to parse EyeLink data files in .asc format, that is, the format that you get after converting an .edf file with edf2asc. This module is mostly for personal use, and is not very well documented.

Installation

pip install eyelinkparser

Expected format

The parser assumes monocular recording.

Expected messages

By default, the parser assumes that particular messages are sent to the logfile. If you use different messages, you need to override functions in _eyelinkparser.EyeLinkParser. This is not explained here, but you can look in the source code to see how it works.

Trial start:

start_trial [trialid]

Trial end:

end_trial
stop_trial

Variables:

var [name] [value]

Start of a period of continuous data:

start_phase [name]
phase [name]

End of a period of continuous data:

end_phase [name]
stop_phase [name]

Function reference

eyelinkparser.EyeLinkParser(folder='data', ext=('.asc', '.edf', '.tar.xz'), downsample=None, maxtracelen=None, traceprocessor=None, phasefilter=None, phasemap={}, trialphase=None, edf2asc_binary='edf2asc', multiprocess=False, asc_encoding=None, pupil_size=True, gaze_pos=True, time_trace=True)

The main parser class. This is generally not created directly, but through the eyelinkparser.parse() function, which takes the same keywords as the EyeLinkParser constructor (i.e. the keywords below).

Parameters

Examples

import eyelinkparser as ep
dm = ep.parse(defaulttraceprocessor=ep.defaulttraceprocessor(
    blinkreconstruct=True, downsample=True, mode='advanced'))

Tutorial

For a tutorial about using EyeLinkParser, see:

License

python-eyelinkparser is licensed under the GNU General Public License v3.