Connecting to fMRI scanner

I’ve built an experiment (using the builder and some Py snippets). Now I’d like to run it on the fMRI scanner. How do I ask Psychopy to run the experiment in the scanner and write the keyboard and pulses data from there? Where can I find help about it?

You start by asking someone who knows how that particular scanner works - we can’t answer that for you. e.g. how does this scanner indicate that the acquisition has started? Many will just simulate a particular keypress on a keyboard, others will use a serial port, and so on.

Thanks! so apparently it’s keyboard - the scanner sends ‘5’ every pulse and 1/2/3/4 for the four key attached to the scanner. This means that I have to listen and record the ‘5’ strokes through the experiment regardless to which block is currently running. How do I do that?

OK, this makes things very easy, as you will be able to test the experiment completely on your own computer.

Just set the experiment to have an initial routine that maybe displays some instructions and is set to last indefinitely, with a keyboard component set to force the end of the routine when '5' is pushed.

During the experiment, just set the keyboard component to listen for keys 1 through 5 and to record reaction times. Continually monitoring for the 5s though will mess up the data a bit, as a list of keys will be stored on each trial rather than just the response you want - this will make the analysis a bit harder as you’ll need to process the file a bit to extract those. Do consider whether monitoring the 5s is really needed – hopefully detailed testing will confirm whether or not the timing is slipping over the course of the study.

But then (in case I add 5 to the enabled keys) I’m at a risk of terminating a stimulus because a pulse came before a participant’s input - without getting the participant’s input at all, right? so I have to add some patch that when a trial routine ends - to check whether it ended by a ‘5’ and if so - to return it back with the remaining duration, right?