Manual Tracking

The program mtrack runs manual tracking experiments. The target signal is presented on the screen together with a pointer which is controlled by mouse movements. Target signal motions may be created on line as random motion or as a sum of sinusoidal components or they may be created in advance and read from a file.

Program Features

Signal Appearance

The target point form is defined by targetform. It may be set to 0 (cross), 1 (bar), 2 (circle), and 3 (disk). Its size is targetsize. The tracking point appears as a cross mark. Its size is pointersize. The initial pointer position is given by pointerx and pointery. Pointer color is px, py, and pL and target color is tx, ty, and tL. If the flag H is on and the target hit condition is met then the target color changes to htx, hty, and htL.

Random Target Signal

If mtype = 0 then the target signal is a random sequence. Its smoothness is controlled by smoothness which may be in the range from 0 to about 100, depending on CPU speed. The actual meaning of smoothness is how often the filter x'(t) = 1/3 x(t-1) + 2/3 x(t) is applied to the initally created random sequence of x- and y-positions. Amplitudes are given by xamplitude and yamplitude. The signal is computed for period seconds and repeated cyclically until the display time dsptime has passed. Multiple runs of the experiment create different random sequences only if randseed is set to different values for each run.

Motions which are smoother than may be created with smoothness are possible by preparing the signal in advance and read it from a file or create it as a mixture of sinusoidal components with random phases.

Target Signals with a Finite Number of Sinusoidal Components

mtype = 1 selects a target signal with sinusoidal components. The actual target function in this case is x(t) = (a_x / n_x) * Sum(i=1,n_x) sin(2 Pif_x,i t - Th_x,i) y(t) = (a_y / n_y) * Sum(i=1,n_y) sin(2 Pif_y,i t - Th_y,i). The frequency components f_x,i and f_y,i and the respective phases Th_x,i and Th_y,i are stored in the range valued parameters xcomponents and ycomponents. Storage is such that xcomponents is a sequence of (f_x,i,Th_x,i)-pairs. The number n_x is the number of pairs in xcomponents. The amplitude a_x is given by xamplitude. A corresponding relation holds for the signal's y-component.

The target signal is computed in advance. Since it is periodic it is sufficient to compute only one period. The length of the target signal's period is given by period in seconds. Here is an example of parameter values:

   xcomponents = [0.1, 0.0, 0.3, 0.0, 0.7, 0.0]
   ycomponents = [0.1, 0.0, 0.4, 0.0, 0.5, 0.0]
   period = 10.0
The signal contains the following components: f_x = 0.1, 0.3, 0.7 Hz and f_y = 0.1, 0.4, 0.5 Hz. All phase shift values are 0. 10 s of the signal are computed. This contains 1, 3, and 7 periods of the f_x components and 1, 4, and 5 periods of the f_y components.

Here is a second example of parameter values which create a circular motion path with 5 s per circle.

   xcomponents = [0.2, 3.141592/2.0]
   ycomponents = [0.2, 0.0]
   period = 5.0

Reading Target Signals from a File

If mtype = 2 then the target signal is read from file targetfile in directory targetpath (note that targetpath has to contain a path separator character as its last character). The file targetfile contains integer values of (x,y)-coordinates for the target signal. Each pair of values is on a single line, values are separated by blank spaces. The display plane has its origin at the screen's center and the plane's coordinate units are pxlm (1/10 mm).

At most maxtpoints target point values may be contained in a target file. Each target point is shown for frametime ms and the target positions given in the file are repeated if dsptime is longer than the number of available positions need for being displayed.

Feedback Transformation

Usually the tracking point on the screen follows the mechanical mouse pointer motion as good as possible. In order to exactly control the feedback motion it is possible to modify the linear transformation matrix which is used to control the mapping of the mechanical mouse to the screen pointer. This 2\times2 matrix is defined by the four parameters transa, transb, transc, and transd. These are the transformation matrix entries multiplied by 1000. The default is transa transb = 1000 0 transc transd 0 1000. This creates a unit matrix for feedback.

Data Recording

If the flag T is set then the target points and the subject's pointer positions are stored and written to the file trackfile. This allows a complete recording of each target and data point. However, at most maxdpoints will be allowed and maxdpoints has to be less than 32000 on a MS-DOS PC. Depending on CPU memory it may be necessary to use a smaller value for maxdpoints.

The root mean square error and the time on target are also calculated. The root mean square error is stored in rms and the number of points used to compute it is nrms. This usually corresponds to the number of target signal positions shown. The time on target is stored in ontarget. The target radius counting as a hit is given by hitradius. There may be a time delay between the start of the target signal motion and error parameter computing. The time delay is given in recdelay in ms. If recdelay is nonzero then nrms is less than the actual target positions shown.

Program Parameters

attwait (int)
Time delay between end of attention signal and start of target motion if the flag A is set.

bgheight , bgwidth (int)
Width and height of background field.

bgx , bgy , bgL (float)
Background field color and luminance.

dsptime (int)
Duration of signal display in seconds. If dsptime is 0 then the signal is shown until a mouse button is pressed.

flags (string)

A
Give an acoustic attention signal before starting the target motion attwait ms after the attention signal is switched off.

H
Indicate target hit condition by changing the target color.

M
Indicate target miss by a sound signal.

S
Use the target path as a static path to be displayed while the subject has to follow it.

T
Write complete tracking data into data file.

frametime (float)
Video frame duration. Corresponds to the duration of one signal step. Cannot be set in a parameter file.

framespermove (int)
Number of video frames to be used for one single motion step. Should always be 1.

hitradius (int)
Radius around the target position which defines the hit area for computing the time-on-target parameter ontarget.

htx , hty , htL (float)
Target color when tracking point hits the target.

maxdpoints (int)
Maximum number of points to record as data for the file trackfile.

maxtpoints (int)
Maximum number of target signal points in a target signal file targetfile.

mtype (int)
Target motion type: 0 (filtered random motion), 1 (sum of sinusoids), 2 (signal read from file targetfile).

nrms (int)
Number of points used to compute rms (set by the program).

ontarget (float)
Time on target [ms] (returned by the program).

period (float)
Duration of one signal period in seconds. Should contain an integer number of periods of all x- and y-components. Otherwise there will be jumps in the signal motion path when a period starts repeatedly.

pointersize (int)
Pointer mark size.

pointerx , pointery (int)
Pointer start position.

px , py , pL (float)
Pointer color and luminance.

recdelay (int)
Time interval between start of signal motion and start of error recording for rms and ontarget.

rms (float)
Root mean square error.

smoothness (int)
Smoothness of random target motions.

speedctrl (int)
Time it takes to handle one motion step. If speedctrl is larger than frametime then the CPU is too slow to handle the display properly. In this case all frequency dependent stimulus properties will be wrong. NOTE: For checking CPU speed both frametime and speedctrl have to be trial parameters.

targetfile (string)
Tracking target points file name.

targetform (int)
Form of target signal: 0 (+), 1 (\scriptstyle\blacksquare), 2 (\circ), 3 (\bullet).

targetpath (string)
Directory path name for accessing the tracking target files. Must have a directory separator character as its last entry (default: "./").

targetsize (int)
Target size.

tmctrl (float)
Actual tracking duration in milliseconds.

trackfile (string)
Pure tracking data file name. The target points and the data points are written to this file if the flag T is set.

transa , transb , transc , transd (int)
These parameters define a 2\times2 feedback transformation matrix. The matrix entries are devided by 1000 before they are used. The default is a unit matrix which does not destort the feedback.

tx , ty , tL (float)
Target color and luminance.

xamplitude , yamplitude (int)
Target motion amplitudes.

xcomponents , ycomponents (float)
Sine component frequencies and phase lags of the target signal.

Example Experiments

Motion with Sinusoidal Components

Here is a parameter file to create a target with sinusoidal motion components. Note that data are recorded on a file whose name is built by substitution with subjectcode and dspcount.


Parameter file track.x from directory \pxl\app\track

Demonstrating the Pulfrich Phenomenon

The following parameters create a horizontal motion which is the projection of a sinusoid. It may be used to demonstrate the Pulfrich phenomenon if the observer watches the screen with one eye covered by a gray filter. Note that the display is stopped by pressing a mouse button. No data are collected.


Parameter file pulfrich.x from directory \pxl\app\track

Back to table of contents


Author: Hans Irtel

irtel@psychologie.uni-mannheim.de