Timing question and (very) short display intervals

Hi all,

I've got a question about timing presentation times for visual stimuli. I've recently switched from using Cogent to PsychToolbox and my experiment is designed as a 2AFC discrimination task in which I show my stimuli for a very short time, ie. 3 frames on a 120Hz display (25ms).

In cogent, I would use the flip command for this, so it would look something like:

for i=1:3, timestamp = cgflip; end

And I would have shown the stimulus for 3 frames. From the timestamps I could also (although it's probably not advisable - or not best practice) calculate exactly how long the stimulus would have been shown.

How would you go about to do this in PsychToolbox? Could I use the same structure or is there another way of  controling the presentation time of my stimuli to the greatest accuracy?

Thanks in advance - any help would be greatly appreciated!

Best,
Arthur Lugtigheid
(Master student bio-cognitive psychology)

Welcome Ex-Cogent user in the world of much more powerful
and much less well documented PTB ;-)

Read message 6232 for explanation of how to use Screen('Flip')
for standard paradigms.

Your example:

slack = Screen('GetFlipInterval', win)/2;
...Draw stimulus...
tonset = Screen('Flip', win);
toffset = Screen('Flip', win, tonset + 0.025 - slack);
stimduration = toffset - tonset;

...but read the message for the full story. Also use the
Priority() command to enable realtime scheduling.

The tonset, toffset timestamps are accurate to better than 100
microseconds on a correclty working single display Windows
system with ATI or NVidia graphics or on Macintosh systems.
See FAQ about Fliptimestamps on our Wiki.

-> It's perfectly valid to use these timestamps for timing checks.
-> Of course only on CRT displays. Use of standard flat panels or
many beamers will make timing with < 100 msecs precision
difficult if not impossible.

Try a few of the demos in PsychDemos folder. Some of them
demonstrate this in more detail.

"help VBLSyncTest" and "help PerceptualVBLSyncTest" and the
corresponding scripts for ways to ensure your system timing
is working perfectly.

best,
-mario

--- In psychtoolbox@yahoogroups.com, "a.lugtigheid" <a.lugtigheid@...> wrote:
>
> Hi all,
>
> I've got a question about timing presentation times for visual stimuli.
> I've recently switched from using Cogent to PsychToolbox and my
> experiment is designed as a 2AFC discrimination task in which I show my
> stimuli for a very short time, ie. 3 frames on a 120Hz display (25ms).
>
> In cogent, I would use the flip command for this, so it would look
> something like:
>
> for i=1:3, timestamp = cgflip; end
>
> And I would have shown the stimulus for 3 frames. From the timestamps I
> could also (although it's probably not advisable - or not best practice)
> calculate exactly how long the stimulus would have been shown.
>
> How would you go about to do this in PsychToolbox? Could I use the same
> structure or is there another way of controling the presentation time
> of my stimuli to the greatest accuracy?
>
> Thanks in advance - any help would be greatly appreciated!
>
> Best,
> Arthur Lugtigheid
> (Master student bio-cognitive psychology)
>