Howdy, Stranger!

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

Supported by

Dwell Time

Hi! Is it possible to create an experiment in which participants would be able to proceed to another slide by looking at the AOI for some time? Or is it only possible to choose a response key or set a time limit?

Comments

  • edited August 1

    Yes, definitely possible! To get started, see the PyGaze aoi plugin.

    Since running a timer AND checking each gaze sample during this timer can be computationally heavy, what I tend to do is the following. I present a sketchpad with for example a gaze-contingent fixation cross for a set duration (e.g. 495 ms). At the beginning of my experiment I would have defined the aoi in an inline script; for example:

    FixAOI = AOI('circle', (my_center_hor, my_center_ver), 100) # "my centers" are defined previously. 100 is the size I picked since you need some tolerance.
    

    After the sketchpad, I have another inline script that checks if a fixation occurs in your aoi. It's also handy to build in a key-escape, in case of eyetracking drama.

    while True:
      key, timestamp = my_keyboard.get_key()
      time, gazepos = eyetracker.wait_for_fixation_start()
      if key == 'x': 
        break
        # Press X to exit the loop so you can abort the experiment for example
      elif FixAOI.contains(gazepos):
        break
        # Exits the loop and thus continues to the next screen if a fixation is detected in your aoi
    


    In my example, a fixation cross always appears for a fixed duration of 500ms followed by establishing a brief fixation (default = 5 stable samples I believe). In practice, participants will just look at the fixation cross all the time as instructed -you could always check this offline-. I find this to be a stable method. You still need good tracking and a good calibration though.

    Hope this helps!

    (Edit: standard commands are very dark grey in markdown for me; highlight the code blocks for better visibility 🙂)

Sign In or Register to comment.