Description Usage Arguments Details Value References
Loads .gazedata
file created by an Eprime experiment running on a
Tobii eyetracker, and performs typical data reduction on that file.
1 |
gazedata_path |
path to the |
output_file |
Whether to write the parsed gazedata to a csv file.
Defaults to FALSE. If TRUE, that gazedata is saved to
|
The following columns are captured in the gazedata file:
Subject | Session |
ID | TrialID |
TETTime | RTTime |
CursorX | CursorY |
TimestampSec | TimestampMicrosec |
XGazePosLeftEye | XGazePosRightEye |
YGazePosLeftEye | YGazePosRightEye |
XCameraPosLeftEye | XCameraPosRightEye |
YCameraPosLeftEye | YCameraPosRightEye |
DiameterPupilLeftEye | DiameterPupilRightEye |
DistanceLeftEye | DistanceRightEye |
ValidityLeftEye | ValidityRightEye |
Target | Stimulus |
We extract the columns the following columns: TrialId
, RTTime
,
XGazePosLeftEye
, XGazePosRightEye
, YGazePosLeftEye
,
YGazePosRightEye
, DistanceLeftEye
, DistanceRightEye
,
DiameterPupilLeftEye
and DiameterPupilRightEye
.
Once these column values are loaded, we make three modifications to the gazedata.
Gaze measurements with Validity
codes greater than or equal to
1 are replaced with NA values.
X,Y gaze values are defined in screen proportions. Values that fall
outside [0,1] are outside of the boundaries of the screen and therefore are
nonsensical. Replace them with NA
. We perform a similar correction
on pupil diameters and eye-distances by replacing negative
values with NA
.
The origin of the screen is the upper-left-hand corner of the screen. Flip the y-values so that the origin is in a more familiar position in the lower-left-hand corner of the screen. This way, low y values are closer to the bottom of the screen.
Compute the mean x, y, distance and diameter values for the left and
right eyes. NA
values are ignored when computing the mean, so the
pair (XLeft = NA, XRight = .5)
yields XMean = .5
.
Information about the task, block number, and subject id are extracted from
the basename of the gazedata file. This function expects the gazedata file
to have the format [Task]_[BlockNo]_[SubjectID].gazedata
.
Information about the stimuli for each trial is extracted from the associated
.txt
file that is output by E-prime. These values are handled by the
Stimdata
function.
A dataframe containing the parsed gazedata. Each row of the dataframe
contains the eye-tracking data for a single frame of time recorded during
the experiment. The dataframe has the additional class of Gazedata
.
Tobii Toolbox for Matlab: Product Description & User Guide
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.