Dot pattern of a matrix

I don’t obsessively check this forum on weekends :wink:

Well done. You would have learned a lot by working through that.

The next step will require adding a small amount of code to your experiment. i.e. this sort of specific response collection is not something that can be done just by using the graphical components you have used so far.

This is done by inserting a “code component” into the relevant routine, and typing code in one of its tabs so that it runs at the right time (e.g. at the beginning of the experiment, at the beginning or end of the routine, etc). In your case, you will mostly want code that runs on every screen refresh (e.g. typically 60 times a second for a standard LCD screen).

What you will do is, 60 times a second, check to see if the mouse has been clicked in one of your stimuli. If so, you store that response in the data. You’ll probably need to create a second routine that is similar to your current one, but instead of an array of 9 dot stimuli, you’ll need an array of nine squares that the person can click on to give a response. If you are using the latest version of PsychoPy, you should be able to copy your existing routine, give it a new name, and modify your existing nine stimuli as required.

Look here for a start re the code:

The code will need to be customised for your particular purposes. In particular, you’ll need to think about how to decide when the response trial is complete. But come back to us when you have got the basic click detection working.

1 Like