Manages the iRec eyetrackers https://staff.aist.go.jp/k.matsuda/iRecHS2/index_e.html.
The eyetrackerCore methods enable the user to test for common behavioural eye tracking tasks with single commands.
Multiple fixation windows can be assigned, the windows can be either circular or rectangular. In addition rectangular exclusion windows can ensure a subject doesn't saccade to particular parts of the screen. fixInit allows you to define a minimum time with which the subject must initiate a saccade away from a position (which stops a subject cheating in a trial).
To initiate a task we normally place a fixation cross on the screen and ask the subject to saccade to the cross and maintain fixation for a particular duration. This is achieved using testSearchHoldFixation('yes','no'), using the properties: fixation.initTime to time how long the subject has to saccade into the window, fixation.time for how long they must maintain fixation, fixation.radius for the radius around fixation.X and fixation.Y position. The method returns the 'yes' string if the rules are matched, and 'no' if they are not, thus enabling experiment code to simply define what happened. Other methods include isFixated(), testFixationTime(), testHoldFixation().
Copyright ©2014-2023 Ian Max Andolina — released: LGPL3, see LIv12345c12345CENCE.md
|
function | iRecManager (in varargin) |
|
function | initialise (in me, in sM, in sM2) |
| initialise
|
|
function | trackerSetup (in me, in varargin) |
| calibration + validation
|
|
function | startRecording (in me, in ignoredArg) |
| startRecording - for iRec this just starts TCP online access, all data is saved to CSV irrespective of this
|
|
function | stopRecording (in me, in ignoredArg) |
| stopRecording - for iRec this just stops TCP online access, all data is saved to CSV irrespective of this
|
|
function | getSample (in me) |
| get latest sample from the tracker, if dummymode=true then use the mouse as an eye signal
|
|
function | trackerMessage (in me, in message, in ignoredArg) |
| Send message to store in tracker data, for iRec this can only be a single 32bit signed integer.
|
|
function | close (in me) |
| close the iRec and cleanup, call after experiment finishes
|
|
function | runDemo (in me, in forcescreen) |
| runs a demo of this class, useful for testing
|
|
function | syncTrackerTime (in varargin) |
| Sync time with tracker.
|
|
function | saveData (in varargin) |
| Save the data.
|
|
function | updateDefaults (in varargin) |
|
function | checkEye (in me) |
| checks which eye is available, force left eye if binocular is enabled
|
|
function | statusMessage (in me, in message) |
| displays status message on tracker, only sets it if message is not the previous message, so loop safe.
|
|
function | edfMessage (in me, in message) |
| send message to store in tracker data (compatibility)
|
|
function | setup (in me) |
|
function | setOffline (in me) |
| set into offline / idle mode
|
|
function | checkConnection (in me) |
| check the connection with the tobii
|
|
function | driftCorrection (in me) |
| wrapper for EyelinkDoDriftCorrection
|
|
function | currentMode (in me) |
| check what mode the is in
|
|
function | syncTime (in me) |
| Sync time with tracker: send int32(-1000)
|
|
function | getTimeOffset (in me) |
| Get offset between tracker and display computers.
|
|
function | getTrackerTime (in me) |
| Get tracker time.
|
|
function | checkRecording (in me) |
|
virtual | initialise (in in) |
| ALL Children must implement these methods!
|
|
virtual | trackerSetup (in in) |
|
virtual | startRecording (in in) |
|
virtual | stopRecording (in in) |
|
virtual | trackerMessage (in in) |
|
virtual | statusMessage (in in) |
|
virtual | runDemo (in in) |
|
function | eyetrackerCore (in varargin) |
| This is the constructor for this class.
|
|
function | getMouseSample (in me) |
| get mouse sample as eye data
|
|
function | resetAll (in me) |
| reset all fixation/exclusion data
|
|
function | resetFixation (in me, in removeHistory) |
| reset the fixation counters ready for a new trial
|
|
function | resetExclusionZones (in me) |
| reset the exclusion state ready for a new trial
|
|
function | resetFixationTime (in me) |
| reset the fixation time ready for a new trial
|
|
function | resetFixationHistory (in me) |
| reset the recent fixation history: xAll yAll pupilAll
|
|
function | resetFixInit (in me) |
| reset the fixation initiation to 0
|
|
function | resetOffset (in me) |
| reset the fixation offset to 0
|
|
function | driftOffset (in me) |
| our own version of eyelink's drift correct
|
|
function | updateFixationValues (in me, in x, in y, in inittime, in fixtime, in radius, in strict) |
|
function | updateExclusionZones (in me, in x, in y, in radius) |
| Sinlge method to update the exclusion zones, can pass multiple x & y values for multiple exclusion zones, sharing the same radius.
|
|
function | isFixated (in me) |
| isFixated tests for fixation and updates the fixLength time
|
|
function | testExclusion (in me) |
| testExclusion
|
|
function | testSearchHoldFixation (in me, in yesString, in noString) |
| Checks for both searching and then maintaining fix. Input is 2 strings, either one is returned depending on success or failure, 'searching' may also be returned meaning the fixation window hasn't been entered yet, and 'fixing' means the fixation time is not yet met... 'blinking' can be returned when ignoreBlinks = true and we think a blink may be occuring.
|
|
function | testHoldFixation (in me, in yesString, in noString) |
| Checks if we're still within fix window. Input is 2 strings, either one is returned depending on success or failure, 'fixing' means the fixation time is not yet met...
|
|
function | testWithinFixationWindow (in me, in yesString, in noString) |
| testWithinFixationWindow simply tests we are in fixwindow
|
|
function | testFixationTime (in me, in yesString, in noString) |
| Checks if we've maintained fixation for correct time, if true return yesString, if not return noString. This allows an external code to quickly select a string based on this. Use.
|
|
function | checkEye (in me) |
| checks which eye is available, force left eye if binocular is enabled
|
|
function | drawEyePosition (in me, in ignoredArg) |
| draw the current eye position on the main PTB display
|
|
function | drawEyePositions (in me) |
| draw the sampled eye positions in xAll yAll on the subject screen
|
|
function | trackerTrialStart (in me, in trialNumber, in task, in stimuli) |
| Send trial start information to tracker.
|
|
function | trackerTrialEnd (in me, in result) |
| Send trial end information to tracker.
|
|
function | trackerClearScreen (in me) |
| draw the background colour
|
|
function | trackerFlip (in me, in dontclear, in force) |
| flip the tracker display, always use dontsync
|
|
function | trackerDrawStatus (in me, in comment, in stimPos, in dontClear, in dontFlip) |
| draw general status
|
|
function | trackerDrawStimuli (in me, in ts, in dontClear) |
| draw the stimuli boxes on the tracker display
|
|
function | trackerDrawFixation (in me) |
| draw the fixation box on the tracker display
|
|
function | trackerDrawExclusion (in me) |
| draw the fixation box on the tracker display
|
|
function | trackerDrawEyePosition (in me) |
| draw the fixation position on the tracker display
|
|
function | trackerDrawEyePositions (in me) |
| draw the sampled eye positions in xAll yAll
|
|
function | trackerDrawText (in me, in textIn) |
| draw the fixation box on the tracker display
|
|
function | doFlip (in me) |
|
function | edfMessage (in me, in message) |
| send message to store in EDF data
|
|
function | getEvent (in me) |
| TODO.
|
|
function | saveData (in me, in args) |
| compatibility with tobiiManager
|
|
function | optickaCore (in varargin) |
| Class constructor.
|
|
function get | fullName (in me) |
|
function | getALF (in me, in subject, in sessionPrefix, in lab, in create) |
|
function | findAttributes (in me, in attrName, in attrValue) |
|
function | findAttributesandType (in me, in attrName, in attrValue, in type) |
| find properties of object with specific attributes, for example all properties whose GetAcccess attribute is public and type is logical.
|
|
function | findPropertyDefault (in me, in propName) |
|
function | clone (in me) |
| Use this syntax to make a deep copy of the object, i.e. OBJ_OUT has the same field values, but will not behave as a handle-copy of me anymore.
|
|
function | checkSuperclasses (in List) |
|
function | editProperties (in me, in properties) |
| method to modify a set of properties
|
|
function | setProp (in me, in property, in value) |
| method to fast change a particular value. This is useful for use in anonymous functions, like in the state machine.
|
|
function | initialiseGlobals (in me, in doReset, in doOpen) |
|
function | initialiseSaveFile (in me) |
| Initialise Save prefix.
|
|
function | checkPaths (in me) |
| checks the paths are valid
|
|
function | eyetrackerSmooth () |
| This is the constructor for this class.
|
|
function get | smoothingTime (in me) |
| calculate smoothing Time in ms
|
|
function | doSmoothing (in me, in in) |
| smooth data in M x N where M = 2 (x&y trace) or M = 4 is x&y for both eyes. Output is 2 x 1 x + y average position
|
|
|
static function | makeArgs (in args) |
| Converts cell args to structure array.
|
|
static function | addDefaults (in args, in defs) |
| add default options to arg input
|
|
static function | hasKey (in in, in key) |
| check if a struct / object has a propery / field
|
|
static function | getKeys (in device) |
| PTB Get key presses, stops key bouncing.
|
|
static function | heuristicFilter (in indata, in level, in steps) |
| Stampe 1993 heuristic filter as used by Eyelink.
|
|
function | drawValidationResults (in me, in n) |
|
function | toDegrees (in me, in in, in axis, in inputtype) |
| to visual degrees from pixels
|
|
function | toPixels (in me, in in, in axis, in inputtype) |
| to pixels from visual degrees / relative input can be [x] [y] [-x -y +x +y]('rect') [xy] or [-x +x -y +y]
|
|
function | parseArgs (in me, in args, in allowedProperties) |
| Sets properties from a structure or normal arguments pairs, ignores invalid or non-allowed properties.
|
|
function | addArgs (in me, in args) |
|
function | setPaths (in me) |
| Sets properties from a structure or normal arguments pairs, ignores invalid or non-allowed properties.
|
|
function | getFonts (in me) |
| set paths for object
|
|
function | toStructure (in me) |
| Converts properties to a structure.
|
|
function | getType (in me, in in) |
|
function | logOutput (in me, in in, in message, in override) |
| Give a metaproperty return the likely property class.
|
|
function | salutation (in me, in varargin) |
| Prints messages dependent on verbosity.
|
|