MasterScan
Lab_Matlab_control Master Branch
|
Reads Eyelink gaze and pupil size data.
dotsReadableEyeEyelink extends the dotsReadableEye superclass to acquire point of gaze and pupil size data from an Eyelink eye tracker.
It relies on mglEyelink functions which are part of the mgl project.
Properties and Events | |
Property | eyelinkIP = '100.1.1.1' |
IP address of the Eyelink machine. | |
Property | defaultFilename = 'dotseye.edf' |
Default filename on eyelink machine. | |
Property | waitForModeReadyTime = 50 |
Time for eyelink to switch to new mode (msec) | |
ELcalibration | |
Calibration properties for Eyelink. | |
![]() | |
Property | x |
the current "x" position of the eye in user-defined coordinates. | |
Property | y |
the current "y" position of the eye in user-defined coordinates. | |
Property | pupil |
the current pupil size, offset and scaled | |
Property | time |
The time of the most-recent sample (in ui time) | |
Property | sampleFrequency |
frequency in Hz of eye tracker data samples More... | |
Property | readEventsOnly = true |
Flag determining whether only to read event data see readNewData for details. More... | |
Property | helpers |
helper objects including screen ensemble | |
gazeMonitor | |
Gaze monitor properties. | |
![]() | |
Property | isAvailable = false |
| |
Property | components |
| |
Property | state |
| |
Property | history |
| |
Property | isAutoRead = true |
| |
Property | eventDefinitions |
| |
Property | initialEventQueueSize = 100 |
| |
Property | clockFunction |
| |
Property | filename |
| |
Property | filepath |
| |
Property | recordDuringCalibration = true |
| |
Property | useGUI = false |
Flag to use GUI for feedback, etc. | |
Property | useExistingCalibration = false |
Flag to skip calibration routine. | |
Property | calibrationUI |
Possibly use a keyboard or other UI to help with calibration. | |
Property | deactivateEventsAtStartTrial =false |
Flag to deactivate all events at the beginning of each trial. | |
Private Properties | |
Property | trackedEye = [] |
Public properties. More... | |
Property | calibrationPlayables = {} |
Playable objects for calibration feedback tones. | |
Property | windowCtr = [] |
Center of window rect for converting screen coordinates into deg vis ang. | |
Property | pixelsPerDegree = [] |
Pixels per degree for converting screen coordinates into deg vis ang. | |
eyelinkVals | |
Return values from Eyelink. | |
Property | blankData |
tracker sending playback data More... | |
Methods | |
self | dotsReadableEyeEyelink () |
Protected properties. More... | |
time | getDeviceTime (self) |
Get the current time value from Eyelink. Units are in seconds. | |
dataMatrix tags | readRawDataFromFile (self, filenameWithPath) |
readDataFromFile More... | |
![]() | |
self | dotsReadable () |
| |
initialize (self) | |
| |
calibrate (self, varargin) | |
More... | |
record (self, onFlag, filename) | |
More... | |
reset (self, varargin) | |
reset device More... | |
close (self) | |
| |
delete (self) | |
| |
read (self) | |
More... | |
flushData (self, waitForNoEvents) | |
More... | |
logData (self) | |
More... | |
stateAtTime | getState (self, time) |
More... | |
value data | getValue (self, ID) |
More... | |
event | defineEvent (self, name, varargin) |
More... | |
defineEventsFromComponents (self, names, varargin) | |
defineEventsFromComponents More... | |
defineEventsFromStruct (self, eventStruct, setName, keepExisting, inactivate) | |
defineEventsFromStruct More... | |
showActiveEvents (self) | |
Mostly for debugging. | |
activateEventSet (self, name) | |
Swap in a set of events. | |
activateEvents (self) | |
Activate all events. More... | |
deactivateEvents (self) | |
Deactivate all events. More... | |
activeFlags | getActiveFlags (self) |
Get all active flags. | |
setActiveFlags (self, activeFlags) | |
Set all active flags from array. | |
setEventsActiveFlag (self, activateList, deactivateList) | |
Set/unset activeFlag. More... | |
name data | getNextEvent (self, isPeek, acceptedEvents) |
More... | |
lastName lastID names IDs | getHappeningEvent (self, time) |
More... | |
name waitTime data | waitForEvents (self, eventNames, maxWait) |
Wait for event(s) | |
nEvents | getNumberOfEvents (self) |
More... | |
IDs | getComponentIDs (self) |
More... | |
ID | getComponentID (self, nameOrID) |
| |
name | getComponentName (self, nameOrID) |
| |
indices | getComponentIndicesByID (self, IDs) |
| |
indices | getComponentIndicesByName (self, names) |
| |
time | getDeviceTime (self) |
| |
setDeviceTime (self, val) | |
| |
startTrial (self, varargin) | |
More... | |
finishTrial (self, varargin) | |
More... | |
plotData (self) | |
More... | |
startTrialDevice (self, varargin) | |
Overloaded methods. | |
Protected Methods | |
isOpen | openDevice (self) |
Public methods. More... | |
closeDevice (self) | |
openDevice More... | |
status | calibrateNow (self) |
closeDevice More... | |
status | calibrateValidate (self, mode, autoTrigger) |
calibrateValidate More... | |
driftCorrect (self, xy, drawTarget) | |
Drift correction. More... | |
isRecording | startRecording (self) |
drift correct More... | |
isRecording | stopRecording (self) |
startRecording More... | |
newData | readRawEyeData (self) |
stopRecording More... | |
xyt | transformRawData (self, xyt) |
readRawEyeData More... | |
![]() | |
isOpen | openDevice (self) |
More... | |
closeDevice (self) | |
More... | |
resetDevice (self, varargin) | |
Reset the device. | |
status | calibrateDevice (self, varargin) |
More... | |
isRecording | startRecording (self) |
| |
isRecording | stopRecording (self) |
| |
components | openComponents (self) |
More... | |
closeComponents (self) | |
More... | |
newData | readNewData (self) |
More... | |
isEvent | detectEvents (self, data) |
More... | |
newSize | resizeEventQueue (self, minSize, doClear) |
More... | |
nEvents | enqueueEvents (self, eventValues) |
More... | |
eventValue nEvents | dequeueEvent (self, isPeek) |
More... | |
Additional Inherited Members | |
![]() | |
Property | eventQueue |
| |
Property | queueNext |
| |
Property | queueLast =0 |
| |
Property | isRecording =false |
| |
Property | didCalibrate = true |
Keep track of whether calibration occurs. | |
Property | defaultEventPrefix = 'event' |
Default prefix for event names: <prefix>_<componentName> | |
Property | eventSets |
Strutures with different named event definitions, in case we want to quickly swap between them. | |
![]() | |
static isHappening data readable | isEventHappening (readables, eventName) |
More... | |
static didHappen waitTime data readable name | waitForEvent (readables, eventName, maxWait) |
More... | |
static data | loadDataFile (filename, varargin) |
Load data from file. More... | |
self dotsReadableEyeEyelink | ( | ) |
Protected properties.
Constructor takes no arguments.
dataMatrix tags readRawDataFromFile | ( | self | , |
filenameWithPath | |||
) |
readDataFromFile
Utility for reading data from an eyelink file dataPath is string pathname to where the pupil-labs folder is Returns data matrix, rows are times, columns are:
|
protected |
Public methods.
Acquire Eyelink resources.
|
protected |
openDevice
Release Eyelink resources.
|
protected |
closeDevice
Calibrate the eye tracker Returns status: 0 for error, 1 for good calibration
|
protected |
calibrateValidate
Perform calibration or validation procedure
|
protected |
Drift correction.
Optional arguments are: xy ... [x,y] referent location drawTarget ... flag to draw target at xy
|
protected |
drift correct
Overloaded startRecording method
|
protected |
startRecording
Overloaded stopRecording method
|
protected |
stopRecording
% Read raw Eyelink data. Reads out the current data sample from Eyelink, for on-line checking. NOTE: possibly update to read buffered data, if we end up missing samples. Otherwise, it might not be worth it to get all the buffered data – here we are just typically checking for task flow control, note that the full data set is stored on the eyelink computer. New samples are converted to the dotsReadable three-column style as:
|
protected |
readRawEyeData
% Transform data into screen coordinates
|
private |
Public properties.
Which eye are we tracking?
|
private |
tracker sending playback data
dummy for returning vals