Moving Dots

Description

A moving dot field (aka dynamic random dots) stimulus

Signature

stimulus/moving_dots

Required Parameters

field_radius

Field radius (degrees)

dot_density

Number of dots per square degree

dot_size

Dot diameter (degrees)

speed

Dot speed (degrees per second)

Optional Parameters

field_center_x

Default:

0.0

Field horizontal center position (degrees)

field_center_y

Default:

0.0

Field vertical center position (degrees)

field_rotation

Field rotation (degrees).

If omitted, changes to direction will rotate the dot field.

color

Default:

1.0,1.0,1.0

Dot color, expressed as a comma-separated list of red, green, and blue components. Each component may be described by any valid expression, but the expression must result in a value between 0 and 1 (inclusive).

alpha_multiplier

Default:

1.0

Controls the transparency of the dots. 1.0 is fully opaque, while 0.0 is fully tranparent.

direction

Default:

0.0

Direction of movement for coherent dots (degrees).

If field_rotation is provided (with any value, including zero), changes to direction will not affect dot positions. Otherwise, direction will be treated as a field rotation, and changes to it will rotate dot positions accordingly.

coherence

Default:

1.0

Fraction of dots that move in the specified direction. Non-coherent dots receive random directions.

lifetime

Default:

0.0

Dot lifetime (seconds). When a dot reaches the end of its lifetime, it is removed and replaced by a new dot in a random location.

If set to zero, dots have an infinite lifetime.

rand_seed

Seed value for the random number generator. If omitted, the current system time in nanoseconds is used.

max_num_dots

Maximum number of dots.

If omitted, the maximum number of dots is determined by the values of field_radius and dot_density when the stimulus is loaded.

announce_dots

Default:

NO

If YES, stimulus announcements (i.e. #stimDisplayUpdate events) will include dot positions.

Position data is encoded as a binary array of single-precision floating point values (in platform byte order), with each consecutive pair of values representing the (x,y) coordinates of a dot. The coordinates are scaled to lie in the range [-1,1] and rotated so that the direction of coherent motion is zero degrees.

deferred

Options:
no
yes
explicit
Default:

no

Controls when the stimulus is loaded. If no, the stimulus is loaded at experiment load time. If yes, the stimulus is loaded the first time it is queued. If explicit, the stimulus must be loaded explictly with Load Stimulus.

display

Name of the display on which the stimulus will be presented. If omitted, the default display (if available) will be used.

schematic

Example:

{'color': [0.2, 0.5, 0.8], 'line_width': 3}

This parameter has no influence on how the stimulus is presented on the stimulus display. Instead, it affects how the schematic for the stimulus appears on MWClient’s eye window.

If present, the parameter’s value must be a dictionary containing one or more of the following keys:

'color'

Color of the schematic. The value must be a list of three numbers between 0 and 1 (inclusive), respresenting the red, green, and blue components of the desired color.

'line_width'

Width, in display points, of the lines used to draw the schematic. The value must be a non-negative number. A value of zero means the lines should be as thin as possible.

'hidden'

Visibility of the schematic. The value must be a boolean, where false means the schematic should be visible, and true means it should be hidden.

'fixation_window'

Parameters for the schematic of a fixation point’s fixation window. The value must be a dictionary containing one or more of the preceding keys. (Note: For fixation points, by default the eye window draws a schematic for the fixation window but not the visible stimulus. To show the visible stimulus, include key 'hidden' with a false value at the top level of the schematic dictionary.)

autoplay

Default:

NO

If YES, the stimulus will start playing automatically (as if by an implicit Play Dynamic Stimulus action) after it has been queued and Update Stimulus Display has been invoked. It will also stop playing automatically (as if by an implicit Stop Dynamic Stimulus action) after it has been dequeued and Update Stimulus Display is invoked.

Placement

Allowed at top level:

Yes

Allowed parent:

Compound Stimulus, Folder, Frame List Stimulus, Layer Stimulus, List Replicator, Movie Stimulus, Range Replicator, Stimulus Group