Asynchronous stimulus with serial output within a trial

Hi experts, I am having trouble to build an experiment with a special requirement, could you please help me with it?

Here is the thing. I have two recurrent stimulus (think about two checkerboard on two sides of screen), they are flashing asynchronously during a single trial. Each flashing requires a serial output as trigger.

For example, the trial length is 5 seconds, each stim lasts for 100ms. In trial 1, the left stim flashes 5 times while the right stim flashes 8 times during the trial. In trial 2, the left stim flashes 7 times while the right one flashes 4 times.

I wonder if there is a way to implement this experiment in psychopy. I don’t see a straightforward way to do it in the builder.

Appreciate for your assistance

Hi @Sano_Senx,

You can set a serial out component to start on the condition that, for example checkerboard_one.status == STARTED, where checkerboard_one is the name of one of your stimuli. This is useful to send the trigger on the same frame as the stimulus appears on screen. You can also do essentially the same thing from within a code component, an example is shown on this page.

Hopefully one of these helps!

Kim

1 Like

Thank you. Do you have any idea about how to make the different checkboard flashing asynchronously with varying number of occurence?

No problem!

It depends on how you’d like the task set up specifically really. You could control the onset and duration of two image components or two polygons for example, using either a list or by adding these to your conditions file. Maybe if you take a look at some of the experiments on the Explore tab of pavlovia.org to get started if you’ve not already?

Thanks,

Kim

1 Like