Hi you all,
Here is something I do not understand:
I have an experiment coded and tested with a Mac laptop on Psychopy 2021.2.3
It records all the reaction time as wanted and if I respond too late or too early, it saved them as Nan (which is what I want)
However, when I ran the same code with a windows computer it stores some rt as negative. Do you know where this is coming from ??
If that helps relevant part of my script below:
Best.
Response.getKeys(clear = True)
if Response.status == NOT_STARTED and tThisFlip > 1-frameTolerance:
# keep track of start time/frame for later
Response.frameNStart = frameN # exact frame index
Response.tStart = t # local t and not account for scr refresh
Response.tStartRefresh = tThisFlipGlobal # on global time
win.timeOnFlip(Response, ‘tStartRefresh’) # time at next scr refresh
Response.status = STARTED
# keyboard checking is just starting
waitOnFlip = True
win.callOnFlip(Response.clock.reset) # t=0 on next screen flip
if Response.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > Response.tStartRefresh + current_jitter -frameTolerance:
# keep track of stop time/frame for later
Response.tStop = t # not accounting for scr refresh
Response.frameNStop = frameN # exact frame index
win.timeOnFlip(Response, ‘tStopRefresh’) # time at next scr refresh
win.flip()
Response.status = FINISHED
if Response.status == STARTED and not waitOnFlip:
theseKeys = Response.getKeys(keyList=[‘1’, ‘3’], waitRelease=False)
_Response_allKeys.extend(theseKeys)
if len(_Response_allKeys):
Response.keys = _Response_allKeys[0].name # just the first key pressed
Response.rt = _Response_allKeys[0].rt
# was this correct?
if (Response.keys == str(corrAns)) or (Response.keys == corrAns):
Response.corr = 1
else:
Response.corr = 0