Howdy, Stranger!

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

Supported by

[open] Opensesame and Eyetribe! im lost....

edited September 2015 in PyGaze

I work with an tobii eyetracker and tobii studio. I noticed in your chat, there is the possibility of synchronization with the eyetribe. I am very interested because I wanted to present the opensesame to students as an alternative to E-prime. Thus, each student may be working on your PC in class (Thank you for developing the open sesame). I wanted that the students did an experiment with eyetribe (I will buy 5 to my class). I noticed that the new version of the open sesame already have pygaze. I've been exploring the pygaze the new opensesame using eyetracker of tobii and I did not understand how to put areas of interest in my stimuli. Is there a script that can guide me? Some Opensesame experiment with eyetracker, or some tutorial? Please help me. I'm not very accustomed to pyton code.
Thanks for all


  • edited 9:25AM

    Hi Peter,

    The EyeTribe works a bit differently from what you may be used to. It doesn't record data automatically, and it doesn't offer an integrated analysis tool. Basically, the EyeTribe is just tracking gaze, and it will give you eye-position information when you ask for it.

    So, say that you want to track the time that the eyes are in particular ROIs, you will have to do one of two things:

    • Write a script that retrieves eye-position data (from the EyeTribe) and writes this to file. Then, afterwards, you can analyze this data in whatever way you want.
    • Write a script that monitors eye position and does you ROI analysis online, during the experiment.

    Do you get the general idea? For more specific advice, I'd have to know exactly what you want to do.


  • edited 9:25AM

    Hi! sorry about that.
    I use opensesame in user friendly mode!!! Because im a perfect naive in python code.
    I want to make a simple recognition experiment. I wanted to record how long the participants look at some face features and how many visits...
    How can I do this in a script (you can make an "inline" as the E-prime?)
    Thanks for everything!

  • edited 9:25AM

    Hi Peter,

    I think the easiest solution in your case would be to just log all gaze coordinates to a file. Then, afterwards, you can take your time to analyze the data. So that would be the first option from my previous answer.

    Collecting the data and writing it to file is pretty easy. For example, the following script will continuously (every 50 ms) pull eye-position coordinates, and write them to files called trial-001.csv, trial-002.csv, etc. If you insert this script after a sketchpad (0 ms duration) with the target face in it, you will collect eye position while people are looking at that face.

    # Open a file for this trial: trial-001.csv, trial-002.csv, etc
    trial_id = self.get('count_trial_sequence')
    fd = open('trial-%.3d.csv' % trial_id, 'w')
    # For 2000 ms, collect eye-position samples, and write
    # them to a file.
    duration = 2000
    t0 = self.time()
    while self.time() - t0 < duration:
        fd.write('%d,%d\n' % exp.pygaze_eyetracker.sample())
    # Close the file

    How can I do this in a script (you can make an "inline" as the E-prime?)

    Yes, you'll want to take a look at the Advanced tutorial:


Sign In or Register to comment.