gaze/fixation-dependent start of trial
I am trying to adjust my open sesame experiment (working with an eyelink eye tracker) so each trial starts only after the subject has fixated the central fixation dot for 200 ms (100 samples):
- If there is a 200ms fixation on the central dot I want to start the trial, with a delay of 50 ms.
- If he/she does not I want the experiment to pause at the fixation display, with the possibility to recalibrate pressing "q".
With the pygaze_drift_correct tool does part of the job but I'm unable to control the timing of the fixation or how strict I want to be to accept a certain eye position as sufficiently close to the fixation point.
I hence tried the following inline script (at the start of the sequence element, before the tracker starts recording). It does not give compilation errors but it does not do what I want either. Even when the subject is fixating it stays stuck on the fixation till I press "q" two times in a row (first time to get into the calibration menu, second time to exit the calibration menu) and only then continues with the rest of the trial. What am I doing incorrectly? If anyone has example code for a fixation-contingent sequence they could share that would be helpful too.
Thank you very much,
checked = fix_triggered_drift_correction(pos=None, min_samples=100, max_dev=80, reset_threshold=30)
if checked == True :
print "recalibrate?" #for testing purposes