I have set up a perceptual decision task, where a sequence of stimuli/samples flashes on the screen (presentation rate between two consecutive stimuli is approx. 200ms) and the participant needs to make a keypress at any point during the sequence, to indicate whether more samples appear on the left or right side of the screen. The presentation of a single sample occurs within a routine (pictured below), which is ran by a loop that terminates once a keyboard response has been made.
Now, this all works as it should - except that, on some trials (1/10 or so) the first key press does not register at all and the key has to be pressed again. Of course, this inflates the actual response times and contaminates my data, which is why I would like to solve this issue. I suspect that this happens whenever the key is pressed ‘between loops’ - after Sample X has ended, but before Sample X+1 started. If my intuition is correct, then this issue could by solved by removing the stimulus-presenting loop, and instead include the sequence of stimuli in one routine. This, however, would be cumbersome and probably cause further complications, since I would be unable to select stimuli from the conditions file, the way I do now using a loop.
My question is, has anyone encountered a similar issue and would be able to advice me on what to do? Is there perhaps a way to move the keyboard component ‘a level up’ so that it is not tied to the ‘samples’ loop, but instead starts at the beginning of the ‘trial’ loop and operates in parallel with the samples-presenting routine?
well, I have a change-blindness experiment in which I switch between altered and unaltered picture until participants react or one minute has passed. Both pictures are separated by a mask. So, there is no need to have a sample loop and a trials loop. Could that suit you needs?
Thank you very much for stopping by. That does sound like something I would like to achieve! Would you happen to have the PsychoPy project for that experiment around, or remember how exactly you achieved it?
My apologies, I mixed up Github and Gitlab - I used the same email address for both, however, my usernames differ and the one I provided was for Github. So actually, my Gitlab user name is @Erik1998 - would you be so kind as to replace the previous account with this one?
Many thanks in advance!
@wakecarter The code component does handle quite a lot of stuff; however, most of these have to do with keeping track of remaining time on the task, getting information about each presented stimulus (e.g. whether it appeared on the left or right, its ordinal number in that particular trial, whether a key was pressed during the presentation of that stimulus or not) and selecting the location of the subsequent stimulus (i.e. whether it appears in the upper or lower quadrant of the screen).
The key response is obtained through the ‘keyboard’ component in my routine and the only lines of code that relate to it are the following, which register whether a valid key was pressed or not (the former terminates the stimulus-presentation routine and loop):
My apologies Jens, it seems I checked my other account, completely forgetting about this one… I can see the project now, I will take a look and make a post about whether I found a solution or not. Many thanks once again!