| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
DOTSEXT
Syntax:
DOTSEXT diameter num_pixels coherence distance
direction
The dots extension, DOTSEXT, places white pixels on a black background
at the center of the screen. The initial call to DOTSEXT requires
two integers, diameter and num_pixels, which will place num_pixels
white pixels randomly in a circle diameter pixels across at the
center of the screen (called the "stimulus patch"). (The number of pixels can be
zero, to produce a blank screen.)
Subsequent calls move the pixels distance pixels
in the direction of the angle direction (measured counter-clockwise from the
X-axis) with a probability of coherence (which is a .00 to 1.00 probability
of an individual pixel being moved). If a pixel is not chosen to move coherently, it
is placed randomly somewhere inside the stimulus patch with the given diameter.
If a pixel is chosen to move coherently, but moves outside the stimulus patch, it
is placed randomly inside the stimulus patch. No pixels are allowed to occupy the
same location on the screen, so num_pixels pixels are always in view.
The probability that a pixel will move coherently is calculated independently for each pixel. Therefore, all pixels or no pixels may move coherently in a given frame. Also, the fact that a pixel moved coherently on one frame has no bearing on whether it moves coherently in subsequent frames.
The standard way this extension is used is to generate many images of dots moving in a direction with a coherence, and then display these images in in consecutive frames. The number of images generated should be enough to be displayed without repetition during the response interval (typically 2 seconds maximum). Another standard way to use this extension is to generate just a few images, display them, and then blank the screen. This is what we do in the following example.
In the complete testlist below, each %I command creates one
frame of a moving-dots sequence. Twenty-one frames in all are created: 20
moving-dots frames, and one blank frame. The frame rate is set to 60
frames per second (#F17), thus the total time the moving dots are presented
is 1/3 second. The timing of the response begins with the display of the
first image.
%X[dotsext.cxr] %M2%C2#F17 $$1[diameter,npix,coh,dist,dir] %C %I[1,1,diameter,npix] %I[1,P1,2,coh,dist,dir] %I[1,P2,2,coh,dist,dir] %I[1,P3,2,coh,dist,dir] %I[1,P4,2,coh,dist,dir] %I[1,P5,2,coh,dist,dir] %I[1,P6,2,coh,dist,dir] %I[1,P7,2,coh,dist,dir] %I[1,P8,2,coh,dist,dir] %I[1,P9,2,coh,dist,dir] %I[1,P10,2,coh,dist,dir] %I[1,P11,2,coh,dist,dir] %I[1,P12,2,coh,dist,dir] %I[1,P13,2,coh,dist,dir] %I[1,P14,2,coh,dist,dir] %I[1,P15,2,coh,dist,dir] %I[1,P16,2,coh,dist,dir] %I[1,P17,2,coh,dist,dir] %I[1,P18,2,coh,dist,dir] %I[1,P19,2,coh,dist,dir] %I[1,1,diameter,0] $$ $1[200,5,.50,4,0]%L[1,21,1]#S/0,50,4/#W500 $1[200,5,.50,4,180]%L[1,21,1]#S/180,50,4/#W500 $1[200,5,.50,4,90]%L[1,21,1]#S/90,50,4/#W500 $1[200,5,.50,4,270]%L[1,21,1]#S/270,50,4/#W500 |
The #F17 commands sets the vertical retrace to 16.666 milliseconds per screen. The call to "macro 1" takes arguments for the diameter, num_pixels, coherence, distance, and direction. There are four stimuli presented, with dots moving right, left, up, and down, respectively. Each call generates stimuli with 5 dots per screen, a 50% coherence, and a 4 pixel move for coherent dots.
NOTE: On 'slow' machines, the generation of the images can take up to 1.0 seconds, so the inter-trial wait (the #W500 above) can be minimized. On 'fast' machines, the generation of images is fast, so time must be added to the inter-trial wait.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |