Re: More questions

Julia Trommershaeuser wrote:

>Hi Allen.
>Some good news: I got the first data with the touch screen and they even
>went into a first manuscript...
>
Great !

>
>Thinking about future experiments I have two more questions concerning the
>psychophysical toolbox.
>
>1) Can you think of any way to create a 'dymanic mask'? Something like the
>noise on a Tv monitor? I am planning a short-term memory task which means
>that myt subjects will have to remember something which was previously
>displayed on the screen. In the time interval in which they have to
>remember the stimulus (let's say a red circle) I want the circle to be
>erased and to be replaced by screen (for about one second) that 'flickers'
>like a TV screen.
>Do you have any idea how to create such a dynamic mask? Perhaps by
>randomly shifting small black sqares on a white background?
>
Denis wrote NoiseDemo.m which will be included with Win&Mac Psychtoolbox
2.5. NoiseDemo is simple. Here is an even simpler but less-capable
script to give you the idea::

%open the onscreen window
[w,wRect]=screen(0,'OpenWindow')
%generate a 20-frame movie
for i = 1:20
mf(i) = screen(w,'OpenOffscreenWindow',0,[0,0,100,100]);
screen(mf(i),'PutImage',round(rand(100)*255));
end
%play the movie five times
for j = 1:5
for i = 1:20
screen(w,'WaitBlanking');

screen('CopyWindow',mf(i),w,[0,0,100,100],CenterRect([0,0,100,100],wRect));
end
end
%play the movie five times, doubling the dimensions of each pixel
for j = 1:5
for i = 1:20
screen(w,'WaitBlanking');

screen('CopyWindow',mf(i),w,[0,0,100,100],CenterRect([0,0,100,100]*2,wRect));
end
end
screen(w,'Fillrect') %clear the screen
screen('CloseAll')

Note that you might want to substitute different functions for rand()
according to what kind of noise you want. See NoiseDemo.m for some
examples.

>
>2) Is there a way to move the cursor to a certain position by explicitly
>giving it some screen coordinates? (Like cursor.x = screencenter.x ?)
>
SetMouse.

Your question provided useful feedback. SetMouse would be easier to
discover if the "See Also" section of help for GetMouse and GetClicks
mentioned SetMouse. I've updated GetMouse and GetClicks help files
accordingly.

Best,

Allen

PS. I'm copying this message to the Psychtoolbox forum in case there
are others out there with the same questions.