@@ -6,7 +6,32 @@ Please contact us if you have any further questions: biopsytoolbox@ruhr-uni-boch
[[_TOC_]]
## Installation and setup
After you downloaded the OTBR Toolbox from our website you need to unzip the compressed file using an external unpacking program, for example the open software program 7-Zip (right click, 7-Zip, extract). After that, you can move the extracted folder to any directory you like (by drag-and-drop).
You also need to download, unzip and save the open source Toolbox Psychophysics Toolbox from their website: https://github.com/Psychtoolbox-3/Psychtoolbox-3/zipball/master
or visit their website to get more information: http://psychtoolbox.org/download
You are free to follow the installing procedure described on the psychophysics toolbox Website, but we recommend to simply download and unzip the files to your preferred location. This gives you the opportunity to work with several versions of the Psychophysics Toolbox if needed.
To get a full psychophysics toolbox support on a Windows computer download and install the gstreamer multimedia framework. It allows your computer to render fonts in a better quality and the playback of multimedia files: https://gstreamer.freedesktop.org/download/
We prefer to have only one main folder that contains all external toolboxes one want to use on a computer. Create a subfolder for each Toolbox, e.g.: one folder for the OTBR Toolbox an additional folder for the most recent Psychophysics Toolbox, maybe another folder for an older version of the Psychophysics Toolbox if you still need it. The advantage of this approach is that you are able to use several toolboxes on one computer without any limitations. Please do not copy the folder in the Program Files directory of your system drive C since you need special permissions to copy files into this directory.
Let us assume our main toolbox folder is called “D:\Toolboxes” then we need an additional folder “D:\Toolboxes\OTBRToolbox” and “D:\Toolboxes\Psychtoolbox-3.0.15”
We recommend copying both toolboxes only one time on your computer to avoid conflicts between different versions. You can code and save several experiments on the same computer, but only need one version of the toolboxes installed on the same device at any time.
## Setup an experiment
After downloading, unzipping and saving the toolboxes create one folder to store all the files for your experiment in, e.g. to the path ‘D:\ Experiments\Experiment1’. Your experimental folder should not be the same as your toolbox’s folder! As stated above you can code several experiments on the same device. Create a new folder for every new experiment you code, because setup files will have the same names in every experiment.
To start a new coding project or experiment make sure your working directory in MATLAB is the newly created folder for your project. Please don’t underestimate this first step, because you have to know where your files are
In order to setup the OTBR Toolbox for an experiment you need to copy the files ‘initOTBR.m’, ‘myHardwareSetup.m’ and ‘myParadigmSetup.m’ from the toolbox’s folder into your experimental folder.
Open the ‘myHardwareSetup.m’ script you just copied in MATLAB and define the correct pathway to the OTBR Toolbox folder and the Psychophysics Toolbox folder in the script (sections 1a & 1b). In Windows you can see the correct pathway when you open your folder and click into the Windows-Explorer’s explorer bar, right above your files. Furthermore you have to define the platform of your experimental computer (Windows64Bit or RaspberryPi3, section 1c).
Define all other parameters (sections 2-11) in the myHardwareSetup script if necessary. You can find descriptions and possible arguments in the script that will help you. This will set up the general hardware for your experiment, including input and output devices and possibly a connected Raspberry system that can be controlled remotely via network. For the first start the standard setting are fine and you can now start with your first project.
Make sure to specify the correct pin numbers when using any external devices such as house light or feeder (read chapter 2.2. Coding device interfaces for further information). Default settings are good for testing purposes. In the following example the feeder uses pin number 4 and the feeder light uses pin number 5. Other output devices are not used, thus they contain an empty matrix.