2AFC Trials Example This directory contains files for an example experiment in Ensemble. The experiment utilizes the trial mechanism to present stimuli in the two-alternative-forced-choice (2AFC) paradigm. The experiment uses MATLAB to select trials from the Ensemble database and randomize them for presentation. The included SQL data file will add new records into several database tables. It will not delete any existing data, and can be used with a new Ensemble installation as well as one with existing experiments and data. Steps to install the 2AFC trials example: 1) *Make a backup of your Ensemble database before proceeding.* 2) From the root of your Ensemble installation, extract the archive that contains the stimuli audio files (example-2afc-trials-stimuli.tgz). For example, if Ensemble is installed in /var/www/htdocs, do the following: cd /var/www/htdocs tar zxvf ./examples/2afc_trials/example-2afc-trials-stimuli.tgz 3) Import the SQL file into your database to create the necessary database records. For example: mysql -u username -p password ensemble_database_name < /var/www/htdocs/examples/2afc_trials/example-2afc-trials-data.sql 4) Log in to the Ensemble experiment editor interface and select the experiment with name "2AFC Example". Generate a new master or user ticket. 5) Navigate to the location of the Janata Lab repository MATLAB scripts accessible to the MatRPC user. Subsequent steps assume the script location is /home/matrpc/janatalab/matlab 6) Copy the example parameter MATLAB file (two_afc_globals_example.m) to a version safe for local editing (two_afce_globals.m). For example: cd /home/matrpc/janatalab/matlab/stim_scripts cp two_afc_globals_example.m two_afc_globals.m 7) Edit the two_afc_globals.m file with the correct information for your database connection. You are now ready to run the 2AFC Example experiment.