Hello, I’m creating a Stop Signal Task which I present an arrow and a sound. The sound will be played with 0.25s delay after the arrow was presented. I wrote a code to check if the subject pressed any keys during Stop frames, the delay time will be decreased by 0.05s and when the delay was reached to 0.05s, there is no subtraction. The code works nicely except ending frame:
0.25
0.2
0.15000000000000002
0.10000000000000002
0.05000000000000002
1.3877787807814457e-17 Wrong One
You see I have 6 frames and in which frames the code decrease the delay seconds but in the last frame shows this number : 1.3877787807814457e-17
This is my code in Begin Exp :
startTime = 0.25
This is my code in End Routine :
if stimType == 0 :
if str(respKeyboard.keys) != 'None' :
if startTime == 0.05 :
startTime = 0.05
else :
startTime -= 0.05
elif str(respKeyboard.keys) == 'None' :
startTime += 0.05
else :
pass
else :
pass
Any help will be appreciated.