Some words about stimulus presentation
Every visual stimulus has a position, and how that position is described depends on the coordinate system you use. Details are explained in this section.Coordinate systems
A coordinate system is the way of how a system describes the location of objects.PsyToolkit offers three different coordinate systems. The first two are the ones you will most likely use, whereas the third one is a polar one. If you want to use a coordinate system other than the default coordinate system, you can set the one you want to use in the "options" section.
The default coordinate system uses exactly the same coordinate system as the computer graphics library (SDL) does, with position 0,0 at the top left corner.
The "centerzero" coordinate system uses 0,0 as the center.
Finally, there is a polar coordinate system (in which you present stimuli as an angle and distance from screen center). This is one of the less tested features, and currently, this can only be used for bitmaps (but not for moving stimuli/sprites).
Bitmaps (static stimuli)
Bitmaps are stimuli that can be positioned. You can clear them from the screen, and you can show the same bitmap many times. Bitmaps can also be loaded into sprites (see below).In PsyToolkit, bitmaps are defined in the "bitmaps" section. This section tells you which bitmap files you want to use, and optionally, you can give bitmaps a specific label. Bitmap files can be of practically any format (e.g., jpeg, png, bmp, tiff, gif).
In PsyToolkit, you refer to bitmaps by their label. Because a bitmap can be shown multiple times, you refer to the sequence number of presentation to clear them (see examples).
Example: Show a two bitmaps, one at screen center and then clear them
options centerzero # this makes 0,0 the center of the screen bitmaps smiley # make sure smiley.png exists task showtest show bitmap smiley 0 0 # show smiley at center show bitmap smiley 100 100 # show the same bitmap elsewhere as well delay 1000 # show both instances of the bitmap for 1s clear 2 # now clear the one that was presented 2nd delay 1000 # now only one is left, the one at center clear 1 # clear that one as well block myblock tasklist showtest 1 end
Sprites (dynamic stimuli)
Sprites are stimuli that can move, jump, disappear and return. One of the main differences between bitmap and sprite stimuli is that stimuli keep moving around until explicitly stopped. Thus, a sprite can move around during delays, whilst you are waiting for a key response, and even across trials.Using sprites affects the timing precision of reading the regular keyboard a bit. That is because the computer spends more time on drawing stimuli and less time on checking whether a button has been pressed. This problem can be dealt with by using an external keyboard that has its own timer (Cedrus or IOLab) when working with sprites.