TRACKPixx3 Demo 5 -- Running a free-viewing experiment with the TRACKPixx3 ============================================================================== .. Note:: This demo requires TRACKPixx Revision 18 or later. You can check for recent firmware updates at vpixx.com/whatsnew This demo uses the TRACKPixx3 eye tracker to replicate the findings of Yarbus (1967) which showed that viewing patterns change as a function of the task demand. In this demo, we present a painting three times and collect 8 seconds of free viewing for each presentation. Before each viewing we pose a different question to the participant relative to the painting. After collecting gaze data we plot gaze paths in MATLAB, overlaid over the images, for initial inspection. Finally we save gaze data and some metadata into a .csv file for easy transfer to our analysis software of choice. .. image:: YarbusTask.* :width: 400 :align: center At the beginning of the demo there is an optional calibration step. This step calls ``TPxTrackpixx3CalibrationTesting``, which implements a standard MATLAB TRACKPixx3 calibration script. The tracker must be calibrated for every new participant. We also recommend calibrating after a participant moves away from the chinrest. Following calibration the demo wakes the TRACKPixx3, sets up a tracking schedule with ``SetupTPxSchedule``, and starts this schedule with ``StartTpxSchedule`` at the onset of each painting. This schedule controls recording of eye data, which is stored on a data buffer on the DATAPixx3 controller. We use ``SetMarker`` to store and retrieve the time the TRACKPixx3 began recording. When the maximum viewing time has been reached, we send``StopTPxSchedule`` to the tracker to stop recording. We read eye data from the trial using ``GetTPxStatus`` and ``ReadTPxData``, and store this data before moving on to the next trial. .. literalinclude:: ../DatapixxToolbox/DatapixxDemos/TPxYarbusTask.m :language: matlab :emphasize-lines: 43-46, 50, 56, 116-117, 124, 135, 140-142, 191 :linenos: