neuropsychology/Neuropsydia.py

Shuffle and RT on response()

atnplab opened this issue · 0 comments

Hi all!

I have an issue recording RT and selecting stimuli.
Concerning n.response I want to record RT from the time of presentation of the word e.g. "go" till the time the participant press "T". What I actually get is: 'exceeded time' as a response and a RT that is (I guss) the RT itself + the time_max of 4000. How can I get the correct RT and so the correct response?

Then I would like just shuffle "go", "back", "stop" for 6 times so that each word is presented two times in random orders but random.shuffle on 'stimulus' is not doing the job correctly. Any hints on this?
Many thanks :)

for trial in range(6): 
    stimulus = random.choice(["go", "back", "stop"]) 
    ISI = random.randrange(start=500, stop=2000, step=500)  


n.newpage("grey") 
n.write("+")  
n.refresh()  
n.time.wait(ISI)  

n.newpage()
n.write(stimulus)  
n.refresh()
response, RT = n.response(allow = ["T", "B", "G"], get_RT =True, time_max = 4000)