Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Does eyetracker.log with eyelink delay the task?

LJGSLJGS Posts: 34

Hi, I am implementing a stop-signal task in opensesame, originally meant for an SMI that I now need to transfer to an off-site eyelink 2000. In the task we register responses by looking left or right, rather than keyboard presses. My on-line method for detecting this is just to use gaze position, once it breaches some point on the x axis a response is recorded. Total RT is determined by the time it took gaze position to breach this point.

I am wondering if we will get higher quality RT data by using off-line eyelink processing. However, stimulus onset time varies randomly in my task, and thus to measure RT I need to somehow know when the stimulus appeared in terms of the eyetracker clock. I am wondering if I can achieve this by writing a message to the eyetracker log right before the stimulus launches like below (the code is the generator function for an opensesame coroutine that includes the stop signal stimulus). My question is whether writing to the eyetracker here could potentially interfere with the task timing? My previous testing on the SMI indicated that logging to tracker very slightly delayed the task until the next eyetracker sample (thus introducing a lag of up to 2ms with a 500hz tracker).

I guess 2ms isn't much, especially if it is not actually included in the RT measure but rather just slightly throws the stimulus onset time. Still I want to know if that would happen. Does anybody know whether logging to the eyelink would delay the task? Any comment on whether adding this log at the time of stimulus onset is the best way to measure RT in terms of the eyelink clock?


def break_coroutines():
        response = None
        exp.set('response', None)
        # HERE  
        exp.set('start', time.time())
        while True:
            localpos = eyetracker.sample()

            if toofarleft<localpos[0] <toofarright and toofarup<localpos[1]<toofardown:
                if localpos[0]  < leftx:    
                    response = 'left'
                elif localpos[0] > rightx:  
                    response = 'right'

            if response is not None: 
                end= time.time()
                exp.set('end', end)
                exp.set('response', response)
            #   exp.set('saccade_start', SACCADESTART)
                items['stop_signal_coroutines'].var.duration = 0
                items['simple_coroutines'].var.duration = 0
            # Also break if the coroutines signals that it's over
            keep_going = yield
            if not keep_going:
                    if response is None:
                            end= time.time()
                            exp.set('end', end)


  • sebastiaansebastiaan Posts: 2,950


    The eyetracker.log() function should not introduce a noticeable delay with the EyeLink, so this is fine. If you're using coroutines, and want to make sure that things are running smoothly, you can inspect the coroutines_mean_cycle_duration variable after the coroutines are finished. This indicates how long cycles (i.e. periods between yielding) took on average. Ideally, this would be some submillisecond value.


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

Sign In or Register to comment.