| Reference | Downloads | Github

Jitter duration not recording

OS: Windows 10
**PsychoPy version: 1.85.6
**What are you trying to achieve?: Have Psychopy record Jitter duration

Hi everyone,

I am trying to create a jittered fixation cross using code components. First I create a code component and add this in the ‘Begin Routine’ section:

import numpy
fixDuration = numpy.random.random() + 5.0  

To my understanding this creates a random ITI between 5-6 seconds.
To make sure the stimulus interval is recorded I include in ‘End Routine’

thisExp.addData("Fixation duration", fixDuration) 

I do not receive any syntax errors and the experiment runs fine, but when I try to load the excel data file nothing has been recorded during the experiment.

Every section is blank including fixation data framerate expName session and participant. Does anyone have any suggestions for how to fix this?

No need for this import, Builder does it automatically.

Don’t use the Excel data file option, use the csv trial-by-trial format instead.

Try upgrading to Release 1.85.6

Okay I did not include the import numpy part in the code and I updated to 1.85.6, but the problem persists at least in the excel file. I’m not sure how to get Psychopy to output a csv file. How could I do that?

Also, I tried an alternate version of the code which was


and included the Jitter variable in the length of time for the fixation cross. However, it does not solve the problem in the excel file version.

Click on the “experiment settings” button on the Builder toolbar.