This repository contains a collection of template experiments based on Ibex, a software framework developed by Alex Drummond for conducting Psycholinguistic experiments online. This work originated from a summer project at the University of Toronto in the Department of Linguistics under the supervision of Margaret Grant. Currently, this repository contains experiment templates, where experiment developers require the following type of interactive media in their experiments:
- data_includes: By default, this folder contains one file, example_data.js, which is your main experiment file. For more information about the layout of this file, refer to the Ibex documentation. You can choose to have more than one experiment file in this folder, provided that only one file has the .js extension, and this is the file that would be executed when running an experiment (either on Ibex farm or your server).
- chunk_includes: This folder contains additional files that are embedded into your example_data.js file. Most of the times, this would be additional html files, which are to be included as part of the Message controller, for passing in html code, or audio files that would be required by example_data.js to play sound in the experiment. Please refer to the Ibex documentation for detailed information about controller options and the purpose of html code in Ibex experiments.
- css_includes: This subdirectory contains all CSS files for all controllers in js_includes, and if you are familiar with CSS, you can always modify these files to give a fancy look to your experiments.
- other_includes: This contains one default main.js file that is not to be fiddled with.
- js_includes: Contains all the default controllers available in Ibex. See here for further information about controllers and their role in experimental design.
- www: Useful for setting up your experiment on the local server
After running your experiment once (for the first time), there are some additional folders and files generated by default. These are the results and the server_state folders and the server.log file. The server.log file is irrelevant for our purposes.
- server_state: This subdirectory contains one file, counter which is a counter for the number of times an experiment has run. This would be useful when you eventually deploy your experiment for online use by participants and will help you keep track of how many times an experiment has run. It is however not useful for tracking how many times an experiment has been ran by a specific participant. In order to keep track of such information, you might want to consider hosting your experiment on a specialized online hosting service such as MTurk.
- results: Contains experiment results, for detailed information on which controllers register lines to the results file, refer to the documentation. For our purposes, since displaying images and audio/video make use of the Message controller, we modified our Message controller to print out one line to the results file, which records 'Apprehension time', which records how long a specific message(images, audio/video) was viewed for, which can be a vital piece of data to collect while running Linguistics experiments online. This folder only contains two files, raw_results and results, which are cumbersome to deal with in terms of (extracting and)processing raw data. For this reason, we are currently working on coding scripts (in python or R) which can be used to automate such data processing (such as for example, generating a spreadsheet) for further data analysis.
##Experiment setup on Ibex farm
This setup is the easier of the two. In this case, create a new experiment in Ibex farm, and click
Update from git repo and enter:
- repo url:
- branch/revision: whichever branch you desire
Then simply, refresh the page and the experiment should load.
##Experiment setup on Local Server
To download an experiment, clone the main (master) branch of this repository either by entering
git clone https://github.com/magrant/Toronto-Psycholinguistics-Experiments in a terminal/console on a machine running Unix like operating systems (including Linux/OS X), assuming you have git already installed on your system. If not so, you can download it here for your specific OS. If you are using Windows, we suggest you download Github for Windows on your computer, and then use the
Clone in Desktop button or just use the more recently added Drag and Drop feature, drag the folder to where you desire on your machine.
To clone a specific branch, do
git clone -b <branch-name> https://github.com/magrant/Toronto-Psycholinguistics-Experiments where
<branch-name> can be one of text, image, sound or video. Once again, on Windows, just switch branches on Github and then
Clone in Desktop.
###Running an experiment (requires python 2.x) To run an experiment in your browser (only really useful for testing purposes) on your local server, run the following in a terminal, from the subdirectory www:
Now navigate to your favorite browser, and go to url