Combining two visual experiments written in Psychtoolbox

170 Views Asked by At

I have two different experiments (one is a “change blindness task” and the other one is an “optokinetic stimulation of dots”) both written in psychtoolbox.

I want to combine these two task while running (i.e., to superimpose change blindness task on the OKS paradigm). I would be so thankful if you can let me know about possible ways to combine these two experiment? Or any sources that can be of help to learn how can I approach this.

Best regards, Parishad

2

There are 2 best solutions below

0
On

It may be a good way to define two separate screens and handle both tasks simultaneously:

[windowPtrBig, rectBig] = Screen('OpenWindow', max(Screen('screens')), [256 256 256]);
[windowPtrSmall, rectSmall] = Screen('OpenWindow', max(Screen('screens')), [256 256 256 ], [0 100 1000 1000]);

To get closer to the appropriate answer, the code is needed.

0
On

This is hard to answer without any code provided by you. You should probably look at the examples here: http://peterscarfe.com/ptbtutorials.html

I'm still going to try to answer, but again, without code from you, this might or might not be helpful.

In psychtoolbox you draw stimuli first off screen and then you 'Flip' what has been drawn off screen to be displayed on the monitor. First you set up the display window like this:

screenNumber = max(Screen('Screens'));
[w, wRect] = PsychImaging('OpenWindow', screenNumber, [0 0 0]);

Now you have a fully black monitor. If you want to show something else (here a red dot with a size of 20 pixels at the center of the screen), you have to draw it on the upcoming frame and then 'Flip', like this:

[screenXpixels, screenYpixels] = Screen('WindowSize', w);
Screen('DrawDots', w, [screenXpixels/2, screenYpixels/2], 20, [1 0 0], [], 2);
Screen('Flip', w)  

Your experiments probably have loops that draw the stimuli and flip to them at the appropriate times within each trial. You will have to figure out what things from which loop to put into a combined loop, so they are drawn at the same time and then flipped together. Good luck.