Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.
/ jsSART Public archive

A customizable Sustained Attention to Response Task (SART; described in Robertson et al, 1997) measure, built with jsPsych.

License

Notifications You must be signed in to change notification settings

shamrt/jsSART

Repository files navigation

jsSART

A customizable Sustained Attention to Response Task (SART; described in Robertson et al, 1997) measure, built with jsPsych.

Basic installation (using Ubuntu 14.04, Upstart and Nginx)

Clone the repository:

git clone git@github.com:shamrt/jsSART.git

Clone the jsPsych submodule:

git submodule init
git submodule update

Install NodeJS packages:

npm install

Copy the Upstart configuration file (in etc/) to /etc/init, edit it as necessary, and make it executable:

cp etc/upstart.conf /etc/init/jssart.conf
chmod +x /etc/init/jssart.conf

Note: See howtonode.org if you have trouble.

Copy the Nginx configuration (modify it, too, as necessary):

cp etc/nginx.conf /etc/nginx/sites-enabled/jssart

Set file permissions:

chown -R www-data:www-data .

Start the project:

start jssart

Data compilation

To compile the raw data out by jsSART, run the following commands (note: python [2.7], pip, and virtualenv are required).

First, setup your virtual environment:

virtualenv env

Next, activate it (note: you'll need to activate each time you open a new terminal window):

# in Linux
source env/bin/activate
# in Windows
env/Scripts/activate.exe

Next, install the required python packages:

pip install -r requirements.txt

Finally, run the Python script:

python scripts/compile_data.py

A CSV will be created/updated in the data directory.

Understanding the compiled data

A "legend" explaining the variables generated by compile_data.py can be found in the data directory (variable-legend.xlsx).

Note that the default practice trial conditions for this task replicate either (1) the number of trials from the jsPASAT task that came before it or (2) the duration of the trial blocks from the jsPASAT.

Also note that any changes made to survey questions or the core structure of the jsSART task may necessitate updates to the compile_data.py script.

Run tests

Unit tests for the data compilation code (along with mock data) can be run with the following:

py.test scripts

To watch tests (using pytest-watch):

ptw scripts

And for JavaScript unit testing, go to /testing in the browser.

About

A customizable Sustained Attention to Response Task (SART; described in Robertson et al, 1997) measure, built with jsPsych.

Resources

License

Stars

Watchers

Forks

Packages

No packages published