Missing data in Pavlovia experiment output

URL of experiment:


Description of the problem:

I have created a simple experiment using Builder using letters as visual stimuli.

When I run my experiment offline, the CSV created after experiment is run contains all the time information regarding the start and end of each of the visual stimuli.

However, when I run my experiment online in Pavlovia, the CSV generated after the experiment is run, contains information about the keys that were pressed but there is NO information about the onset and the end of the visual stimuli.

This information is vital for me, since I need to check that the duration of each stimulus was the correct one.

Thanks in advance.

Hi everyone,

I am facing with similar issue. Data numbers in csv are scattered all around. Locally work fine.
Is this related with $ sign, e.g., I used to specified response, $corrAns?



Sorry to bump an old post. Have you been able to determine a solution to this issue? I am running a delayed naming task and the onset and offset times of visual stimuli are necessary for analysis, as output by PsychoPy.

Was anyone able to determine a way to get this timing information from Pavlovia?


Does these help?

Dear @wakecarter Wakecarter,

Yes, this helps tremendously. It turns out that the GlobalClock.getTime function does this. It took me a while to realize that by calling this function at the Start of a Routine and at the End of a Routine would be the way to get an estimate of the Routine’s duration. By splitting my trial into separate Cue - Delay - Target routines, I could get Pavlovia to record durations of each (at least the durations of the commands for each). This will be my best way of determining whether people’s experiences in running an online experiment are anywhere close to what they are supposed to be. I was sidetracked by trying to figure this out using frames and also working with logfiles. It turns out it is rather easy, but, like everything else, it requires knowing how these functions work. I must say if one doesnt do a lot of coding it is rather difficult to decipher from the online psychopy documentation how to actually use the various functions, but I now know enough, thanks to your leads, to get going.

Best wishes & thanks again for taking the time to point me to this thread,
Andy Delamater

Yes. I managed to get Pavlovia to output Routine Start and End times in the datafile. First, I have separate Routines for each part of a trial. So, for instance, one routine presents a cue for x sec, followed by another routine that presents a target stimulus, etc. For each Routine you can add a code component. In the Begin Routine tab for that code component you can add:

//save cue onset times
thisExp.addData(‘CueStart’, globalClock.getTime())

Then, in the End Routine tab for that same code component you can add:
//save cue offset times
thisExp.addData(‘CueStop’, globalClock.getTime())

What this will do is place separate columns in the Pavlovia-generated datafile showing the trial’s cue start and stop times. It gets this information from the globablClock.getTime() function.

However, to use this you’ll also need to specify another code component at the beginning of your experiment that defines the variable called thisExp.


In this way, you can get Pavlovia to give you Routine durations. Note that the globalClock function gives you a value that tells you at what time the Routine, in question, was entered from the start of the experiment. Thus, difference scores will give you an idea of when the program entered and exited that Routine. If you set it up so that a particular stimulus that you are interested in measuring is tied to a Routine then this will work.

Please note, though, these values cannot be used to give you really accurate readings. There are many sources of timing variability, especially with online studies. So, the numbers you are getting with this method will tell you when the computer instruction for presenting a stimulus and turning it off was logged over the course of the study. Although those readings are accurate within the context of the program, exactly how long it takes the computer to actually present and turn off the stimulus once it receives these commands can be variable, and thats what adds to the error. However, this would give you a reasonably good estimate of when the computer was told to turn on and off a stimulus. If you don’t care that there may be error variability on the order of at least one screen refresh cycle, and possibly a bit more, then you’ll be ok.

Hope this helps. It took me forever to figure out how to do this in a simple and straightforward way…

Andy Delamater