[Martin Taylor 2013.09.01.16.50]
I have been playing with the Processing language, and I hope the
result will be useful to someone. I’ve uploaded applications for
Mac, Windows, and Linux (only the Mac version is tested, and that
only trivially) to my Dropbox folder, where you can get it at
.
I also attach the Processing code that is probably better for you to
use if you have Processing (it’s free). Here’s the “ReadMe” that is included with each version.
FlexibleTracker_b1.zip (21 KB)
···
https://dl.dropboxusercontent.com/u/26441754/FlexiblTrackerApps.zip
Flexible Linear Tracking Experiment
This program allows you to alter a variety of parameters in a
simple tracking experiment set within a window of size 100 by 900
pixels. The task is always to influence with your mouse or
joystick a
green ellipse (the “cursor”) that can be moved below a mauve
target ellipse. The tracking may be pursuit (the target moves
left-right across the window undder the influence of a
disturbance)
or compensatory (the target remains stationary at the horizontal
middle of the screen while the cursor is disturbed).
The various parameters that can be set by menus are the
characteristic shape of the disturbance waveform (e.g. sinusoidal,
triangular, step, ramp), the difficulty level of the task (speed
or
bandwidth of the disturbance), the vertical separation between
target
and cursor and its variability, the lag between your move of the
mouse/joystick and its effect on the cursor, compensatory or
pursuit
tracking, and whether and when there are periods when the
disturbance
is static or its effect invisible.
A trial consists of a runin period of 300 frames, (5 seconds) at
a
frame rate of 60Hz, followed by 4096 frames (about 68.3 seconds)
of
recorded data. At the end of a trial, the data are saved in an
Excel-compatible file. The file name is based on the settings of
several of the experimental parameters, and its location is by
default in a folder called “data” under the folder containing
your application. You can set the folder for saving the data as
you
wish.
At the end of a run, three graphs are displayed. Across the top
are shown the traces of the disturbance, the cursor, and the
error,
plus the variation of the vertical separation of target and cursor
if
you have chosen to make it variable. Below it, on the left is a
cumulative histogram of the duration of “still-stands” when the
cursor was not moving, and on the right a Fourier analysis of the
disturbance waveform and the error waveform. At the top-left of
the
window is displayed the file name under which the data for this
run
is stored. The name consists of the values of several of the
parameters used, followed by a serial number if this trial
repeated
the values for a trial already stored. After ten of the same, it
will
start overwriting older versions.
Operation
When you start the experiment, you see a window 1100 by 900
pixels, with seven drop-down menus and two buttons across the top.
One of the buttons is labelled “Go”. You click on this at any
time to start the tracking run. Usually, you will want to set up
the
experimental conditions from the menus before you do this, but if
you
don’t, you will get a run using default parameters if this is the
first run after starting the application, or the same parameters
as
you just used otherwise.
The other button is labelled “Abort” and is always visible
during the run while the other menus and buttons are hidden.
Depending on the state of the operation, one or two clicks will
close
the application.
While the graphs are displayed, you can click anywhere in the
window (except on the “Abort” button :-), and you will again see
the menus displaying the parameters you used for the most recent
run.
To repeat those parameters (though not the same disturbance
waveform), click on “Go”. Otherwise, use the menus to alter the
parameters as you wish before your next run, or click “Abort” if
you want to quit.
Drop-Down Menus
Default values shown in bold italic.
Disturbance Type
Smooth : A waveform whose spectrum
declines by a constant number of db per octave, the number being
set
by the Difficulty parameter. The largest spectral component is the
first, a wave that completes one cycle over the 4096 frames of the
recorded trial.
Ramp: At random times the disturbance changes among three states,
a constant velocity increase or decrease and a period of stasis.
Variable Triangle: The disturbance changes direction and speed ar
random moments, but maintains a constant velocity between changes.
Random Step: The disturbance value changes stepwise at random
moments to any value within its range, but does not change other
than
at those moments. This mimics a “whack-a-mole” game.
Triangle: The disturbance changes direction at random moments,
but
the velocity is always the same.
Perlin: Like “Smooth” but generated differently.
Small Step: The disturbance value changes stepwise, but only
within a region fairly close to its current value, the probability
of
a step size and direction being chosen from a Gaussian
distribution.
White: The disturbance waveform is constructed by adding
sinusoids
whose frequency is an integer multiple of 60/4096 (0.015) Hz.
White noise brings up a slider that
allows you to set the lowest frequency of the noise-band in
increments of 3 x 0.015 Hz. The bandwidth is set by the Difficulty
parameter, and does not depend on the setting of the lower-bound
slider.
Difficulty
There are 5 levels of Difficulty. These are not equated across
the
different types of Disturbance, but they all refer to the speed at
which things change about the disturbance. Apart from the White
Noise
when the lower bound is non-zero, this also means that Difficulty
affects the speed of the target or the cursor across the screen.
In
the case of the White Noise with non-zero lower bound, Difficulty
affects the bandwidth of the noise.
Default is Difficulty 2.
Separation
Separation is the vertical distance in pixels between the mauve
target ellipse and the green cursor ellipse. Three extra
possibilities are included, in which the separation varies
smoothly
and randomly (using Perlin noise) during the course of the trial.
These are labelled by the size and speed of the variation.
Default is Separation 180.
Action Lag
Action Lag is the time in milliseconds between the moment you
move
the mouse/joystick and the moment its influence is felt at the
cursor.
Default “Zero ” actually means one frame of 1/60
sec.
Tracking Type
Tracking type is “Pursuit ” (the target moves and
you try to keep the cursor directly under it) or “Compensatory”
(the target stays stationary in the middle and the Disturbance is
added to the mouse/joystick influence on the Cursor).
Blanking/Bursting
You can choose whether there are interrupting intervals during
which the element affected by the Disturbance (target or cursor)
is invisible (blanking) or during which the Disturbance is held
constant
(Bursting — the bursts are the periods in which the Disturbance
varies normally). There are 5 possibilities:
None: Normal case, no interruptions.
Blanking: The Blanking intervals are strictly periodic
Bursting: The Bursting intervals are strictly periodic
For these two cases, two sliders are
shown that allow you to vary the blanking or static interval in
increments of half-second, and the visible or variable interval in
increments of one second.
Irregular Blanking: The durations of the blanked and visible
intervals vary.
Irregular Bursting: The durations of the static and varying
disturbance are variable.
For these two cases, the same two
sliders are shown, plus one that allows you to set the level of
irregularity of the intervals in increments of 10% of the base
interval. For example, if the visible interval is set to 5
seconds,
and the variation is set to 20%, each actual visible interval will
be
somewhere between 4 and 6 seconds.
Data Folder
Default: The data are saved to a file in a folder called “*** data”
in
the folder that contains the application***.
Choose FolderFile: You use a folder in which to save your data,
but the file name will be the one shown on the display of the
graphs
after you finish the run. (A future extension of this application
is
intended to allow you to extract a named file for further analysis
and modelling, in which case you will be able to select a folder
and
a file).
Comment
When you finish a run and click out of the graphs in order to
show
the menus, the headings display the selections used for the
previous
run, unless they were the defaults. If slider values were used,
they
also are shown.