Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] PyGaze EyeTribe log data file help

edited June 2016 in PyGaze

Hi!

I am currently working with the EyeTribe tracker in opensesame. The task I created is a passive viewing task, whereby participants look freely at images of emotional faces. We are interested in total dwell time on different regions of interest and time to first fixation.

I successfully got the Eyetribe to work with Pygaze, and selected "automatically log all variables" for the pygaze_log function. However, the data I get from this is very unclear. I don't quite know what each column is referring to, and the variable inspector doesn't have them listed. The variables are:

fix, rawx, rawy, avgx, avgy, psize, Lrawx, Lrawy, Lavgx, Lavgy, Lpsize, Lpupilx, Lpupily, Rrawx, Rrawy, Rabgx, Ravgy, Rpupilx, Rpupily

Are the x and y referring to fixation coordinates or fixation length? Moreover, is the psize referring to the pupil area or diameter?

I guess my real question is what is the py_gaze log plugin logging?

Any insight would be helpful. I am quite new to eyetracking/programming so I don't have a very large knowledge base.

Thank you,

Sarah

Comments

  • edited 10:08PM

    Hi Sarah,

    The x and y are referring to coordinates. Pupil size: not sure whether the Eyetribe logs diameter or area, but you should be able to tell based on what values are stored exactly. I know that values representing area are usually in the range of 1000-2000, but this is a fairly arbitrary range; it doesn't really matter for your data analyses.

    Cheers,

    Josh

  • edited June 2016

    Hi all,

    For future reference:

    fix - Boolean that supposedly indicates whether someone is fixating or not. It comes directly from the EyeTribe Server, so I don't know what kind of calculation it actually comes from.

    rawx and rawy - Gaze coordinates averaged from both eyes, or from only one eye when only one eye was available (see Lraw and Rraw).

    avgx and avgy - Smoothed gaze coordinates averaged from both eyes, or from only one eye when only one eye was available (see Lavg and Ravg). Note that these values come directly from the EyeTribe Server, and I do not know what the smoothing process is exactly.

    psize - Pupil diameter averaged over both eyes, in arbitrary units (based on the camera's image; usually it's pixels that are attributed to the pupil). Note that these are NOT millimeters or any other real-life unit!

    Lrawx and Lrawy - Same as rawx and rawy, but for only the left eye.

    Lpsize - Same as psize, but for only the left eye.

    Lpupilx and Lpupily - Pupil coordinates within the camera's view. You can potentially use this to feed into your own pupil-to-gaze calibration algorithm (although ideally, you also want the glint coordinates for that).

    Rrawx, Rrawy, Ravgx, Ravgy, Rpupilx, and Rpupily - Same as for these values with an L, but then for the right eye.

    Please not that some of these explanations are based on my interpretation of the EyeTribe's software and documentation. Not everything is clear from those, so I'm partly going by experience with different trackers and software. That means some of the above could be wrong. When in doubt, contact the EyeTribe directly.

    Further disclaimer: PyGaze is simply a Python wrapper around the EyeTribe API. We do not come up with these values, we just reroute them from the EyeTribe Server into your Python application (e.g. OpenSesame), and into your data file. So, again, when in doubt, ask the EyeTribe people.

    Cheers,

    Edwin

  • edited 10:08PM

    Hi Edwin,

    Thank you so much for the helpful reply! I apologize for the delay, I thought this forum would send me a notification when I received a reply, but it did not. I just have one other question.

    Is there a way to log stimulus parameters into the pygaze_log message? I need the stimulus images to be logged by pygaze, which right now, it isn't doing.

    Any help would be really appreciated! We need to resume testing soon and this is our last obstacle!

    Thank you very much, and I await a reply.

    Sarah

  • edited 10:08PM

    Hi Sarah,

    You should be able to log the stimulus parameters in your pygaze log by using a pygaze_log item. I have only used the Tobii eye tracker settings, so it might be different for different trackers. With the tobii however, the pygaze logfile is a tab delimited file with a name of the form "subject-X_TOBII_output.tsv" (with X being the subject number for the participant).

    You simply need to put the name of the variables in square brackets, for example, if the filename of the stimulus is stored in a variable called stimulus_image you would put [stimulus_image] in the log message pane of the pygaze_log item.

    Also, you can include multiple variables (and comments etc.). This seems to work such that anything on the same line in the pygaze_log will go in the same cell (when using a spreadsheet to look at your pygaze log file), and anything on different lines go in a different row. If you want to put comments/variables in different columns in the same row, you need to include the delimeter character between the comments/variables on the same line in the pygaze_log item.

    For the Tobii at least, the comments/variables in the log file appear in the "event" column.

    Hopefully that makes sense. If you have a play with it, you should see it is quite straight forward.

    Best wishes,

    Neon

  • edited 10:08PM

    Thank you so much for your reply Neon! I will give that a shot!

  • edited 10:08PM

    Hi again!

    Thank you so much for the suggestion. It is now logging my stimulus image name, but it is logging it as a separate message at the end of the trial, rather than in conjunction with the time stamps. Although I can manually input the file names with the time stamps, this process would be extremely long and potentially more complicated with more complex stimuli.

    Is there a way to log the stimulus with the timestamps? I have a feeling this could be done with an inline_script, but I have no experience in python code. It may also be just how my eyetracker logs things, so perhaps it cannot be done.

    For clarity, here is what the pygaze_log looks like for my experiment:

    http://img.cogsci.nl/?q=5773dd2aed25e

    And here is my output (the stimulus is highlighted in yellow).

    http://img.cogsci.nl/?q=5773dd963de3d

    Column A is the time stamp, column B is the time in milliseconds, Column C is "fix" and Column D is the eyetracker state.

    Any ideas?

    Thank you!

    Sarah

  • edited 10:08PM

    Answered in the other thread :)

    http://forum.cogsci.nl/index.php?p=/discussion/2206/open-pygaze-message-logging-format#Item_3

    PS: Thanks for opening another thread for your new issue. It's better to keep things separated, to keep the forum more organised, and easier to navigate for future users.

Sign In or Register to comment.