OS : Win 10
PsychoPy version: 3-3.1.5 (Builder)
(Sorry for my english)
Hi, in my experiment, a participant has to complete a mental fatigue task, its an alternation of numbers and letters. They have to press “2” when the number is even, “3” when he is odd, and “space” if 2 identical letters follow each other.
The letters and numbers should continue to scroll even if the participants does not respond.
The appearance of letters and numbers depends on the response time of the participant, but i don’t know how to code it.
So if the participant presses correctly and quickly, the letters and numbers will appear faster. And if the participant presses correctly but slowly, the numbers and letters will appear less quickly. So the duration of the stimulus depend of the participant respond time.
To be more precise:
The time of appearance of a stimulus is basically 1.5 seconds, so it remains on the screen for 1.5 seconds. During the task, the participant will respond more or less quickly to the appearance of the stimuli by pressing the response key on the keyboard.
I have therefore put in my external list an appearance time of 1.5 seconds for each stimulus. However, this appearance time should be adapted to the participant’s response time, and that’s what I don’t know how to do.
So for example, if the participant responds very quickly, the appearance time of the stimuli will automatically decrease.
I managed to randomly vary the time of appearance of the stimuli with this code:
randDuration = random.randint
But I don’t know how to link the time of appearance of stimulis to the response time.