Howdy, Stranger!

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

Supported by

[open] Limit number of fixations for Open Sesame Eye link Exp

edited June 2014 in OpenSesame

Hello!
For my face recognition experiment, I need to limit the number of fixations my participants are allowed to have while looking at a face. Is there a way to do so in Open Sesame? I have it connected to EyeLink already.

Comments

  • edited 2:48PM

    Hi Olya,

    This will require a bit of inline scripting, but not much. Basically, you can make use of the wait_for_fixation_start() function like so:

    n_fixations = 5
    print('Wating for %d fixations' % n_fixations)
    for i in range(n_fixations):
        exp.eyelink.wait_for_fixation_start()
        print('Detected start of fixation %d' % i)
    print('Done!')
    

    See also:

    Alternatively, if you don't like scripting, you could use the eyelink_wait plug-in, set the event to 'Fixation start', and put it in a loop to repeat it a few times. The inline_script way is a bit more straightforward, though.

    Cheers!
    Sebastiaan

  • edited 2:48PM

    Thank you Sebastian! So do I just type in the code above into the inline script Run window? The inline script is located above the sketchpad with all my face photos. Is that it?

  • edited 2:48PM

    Hi Olya,

    Yes, you can copy-paste the code into the run window of an inline_script. I suspect that you will have to place it below the sketchpad with the photo's though, because you want the fixation checks to occur after the photo's have appeared, right?

    I would also recommend walking through some basic Python tutorials. Some knowledge of Python will be very convenient if you want to do online checks, gaze-contingency, etc, with the Eyelink. See:

    Cheers!
    Sebastiaan

  • edited 2:48PM

    Hi Sebastian,
    I have switched to pygaze plug-ins, so the code above doesn't work anymore. Could you please post the pygaze equivalent of it?
    Thank you very much.

  • edited 2:48PM

    Hi Olya,

    Replace exp.eyelink with exp.pygaze_eyetracker, and everything should work the same.

    Good luck!

Sign In or Register to comment.