Hi everyone,
I need to change my experiment from online to offline. Some of the components were written only in Javascript, I have managed to changed most of it so it works offline. However, the timing isn’t quite right. This is a sequence learning task so participants learn 4 element sequences using the computer keyboard and the faster the participants complete the sequence the more points they get. Currently, when I perform the sequence very fast and correctly it gives me 0 points and when I do it slightly slower I get more points.
This is the URL for the online version of the experiment for context: behaviouralCQ [PsychoPy]
I think the problem is this section of code. This section of the code tracks the stim times for the instructed trials. This is the original code in javascript:
Begin routine tab:
routine_times.append(util.MonotonicClock.getReferenceTime())
stimLogged = False
each frame:
store the stim onset times
if t >= 0.0 and imageB.status == PsychoJS.Status.NOT_STARTED:
# grab the time relative to the global monotonic clock which is the same clock used for the time
# stamps of key presses
imageB.globalMonotonicStart = util.MonotonicClock.getReferenceTime();
end routine:
store the tim onset times in a list
stim_times_global_monotonic.append(imageB.globalMonotonicStart)
I have changed this code to this:
Begin routine:
Clock = core.Clock()
routine_times.append(Clock.getTime())
stimLogged = False
Each frame:
if t >= 0.0 and imageB.status == NOT_STARTED:
# stamps of key presses
imageB.globalMonotonicStart = Clock.getTime();
End routine:
store the time onset times in a list
stim_times_global_monotonic.append(imageB.globalMonotonicStart)
I don’t really code in python so is there anything in this part of the code that I have changed that would explain the problems I am having with the timing?
Thank you, if anymore details are needed let me know.