07-May-2019 17:04:25

This zip file contains Matlab scripts and functions for running the accelerated
race-to-threshold model as described in the article

Salinas E, Steinberg BR, Sussman LA, Fry SM, Hauser CK, Anderson DD, and
Stanford TR (2019). Voluntary and involuntary contributions to perceptually
guided saccadic choices resolved with millisecond precision. eLife.


SYSTEM REQUIREMENTS

The model is meant to run in the Matlab programming environment (The Mathworks,
Inc., Natick, Massachusetts). It was developed in a system with the following
specifications:

MATLAB Version: 8.5.0.197613 (R2015a)
Statistics and Machine Learning Toolbox: Version 10.0 (R2015a)
Operating System: Microsoft Windows 7 Home Premium Version 6.1 (Build 7601: Service Pack 1)
Computer: Dell XPS with Intel i5-2410M CPU @ 2.30 GHz, 6 GB of RAM

The scripts are very likely to run on any system that supports and has installed
Matlab R2013 or later, and the Statistics Toolbox.


INSTALLATION 

Unpack everything into one directory. Open Matlab and move to the chosen
directory. Entering

>> race_model_demo 

at the Matlab prompt should run the main script. 


INSTRUCTIONS

The graphics produced are better viewed with a black background. To set it,
first close any open graphics windows by entering

>> close all

at the Matlab prompt, and then entering

>> colordef none

(colordef black also works).

The main script, race_model_demo, can run in two modes:

-- Normally, if the variable do_batch does not exist (or is equal to zero),
   individual trials are run one by one. Plots are shown on two windows while
   the script is running. Figure 1 shows how the simulated neural responses of
   two populations of neurons, xR and xL, vary as functions of time in each
   single trial, whereas Figure 2 shows the updated psychophysical data
   (psychometric, chronometric, and tachometric curves) for all trials
   accumulated so far. In this mode, hitting enter runs one trial, whereas
   entering an integer n runs that number of trials and updates Figure 2 only.
   Enter 0 trials to exit the script.

-- Alternatively, when the variable do_batch exists and is set to an integer n,
   n trials are run without any graphical output. This is considerably faster.

So, to run the model in graphical mode, simply enter

>> race_model_demo 

at the Matlab prompt. Alternatively, to run, say, 10,000 trials without
interruption, enter

>> do_batch = 10000
>> race_model_demo 

In either case, once the script finishes, the relevant output is the matrix
"data", which contains the simulated psychophysical results.  Each row of this
matrix corresponds to one trial, and contains 4 values in 4 columns

   | gap | RT | hit {1,0} | target location {-1,1}

where gap is the gap value used in the trial, RT is the reaction time, the
variable hit is 0 for incorrect and 1 for correct choices, and target location
can be -1 (for target left/cue right) or +1 (for target right/cue left). This
was the same format used for the experimental data, except that the model only
applies to gaps >= 0 (i.e., urgent trials, not delay trials). To process and
visualize the results contained in "data", enter the following at the Matlab
prompt

>> psych_analysis_demo(data)

The function psych_analysis_demo will calculate and plot a variety of
psychophysical results. In each case, press a key to advance to the next screen.

Without any modification, the model will simulate the results obtained with the
pooled data from all 6 participants in the high-luminance condition. That is, it
will reproduce the model results shown in Fig.  6d-g of the paper. Inspect the
header of race_model_demo for instructions on how to simulate other experimental
conditions.  

Consider that the smoothness of the resulting curves will depend on the number
of trials accumulated; approximately 80,000 were used in the published figures.
With a system comparable to the one used during development (see above),
simulating 80,000 trials should take less than 30 s. But it is advisable to try
out things with a few thousand trials to begin with.

An example dataset is included to verify the results. To load the example
dataset, which is simply a matrix "data" with 80,000 trials, enter

>> load example_data

Then, to see the corresponding psychophysical curves, use the same call as
above, i.e., 

>> psych_analysis_demo(data)

The plots should be very similar to those produced after running
race_model_demo.


CONTACT INFORMATION

For questions, comments, or other inquiries please contact

Emilio Salinas
Department of Neurobiology & Anatomy
Wake Forest School of Medicine
Winston-Salem, NC, 27157
(336) 713-5176
esalinas@wakehealth.edu

Copyright (c) 2019 Emilio Salinas


