Skip to content

Commit

Permalink
Updates to README; PTB install check
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Feb 19, 2020
1 parent 4d6e0d2 commit d7d83dd
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 40 deletions.
10 changes: 10 additions & 0 deletions +eui/SignalsTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@
'signals:test:copyPaths',...
'No paths file found. A template can be found in %s.', ...
fullfile(fileparts(which('addRigboxPaths')), 'docs', 'setup'))

% Check that the Psychophisics Toolbox is installed
toolboxes = ver;
isInstalled = strcmp('Psychtoolbox', {toolboxes.Name});
if ~any(isInstalled) || str2double(toolboxes(isInstalled).Version(1)) < 3
error('signals:test:toolboxRequired',...
['Requires Psychtoolbox v3.0 or higher to be installed. '...
'Follow the steps in the <a href="matlab:web(''%s'',''-browser'')">README</a> to install.'],...
'https://github.com/cortex-lab/Rigbox/tree/master#installing-psychtoolbox')
end

obj.LastDir = getOr(dat.paths, 'expDefinitions');
if nargin > 0 % called with experiment function to run
Expand Down
59 changes: 20 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
![Coverage badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fsilent-zebra-36.tunnel.datahub.at%2Fcoverage%2Frigbox%2Fmaster)
![Build status badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fsilent-zebra-36.tunnel.datahub.at%2Fstatus%2Frigbox%2Fmaster)

Rigbox is a high-performance, open-source MATLAB toolbox for managing behavioral neuroscience experiments. Initially developed to probe mouse behavior for the [Steering Wheel Setup](https://www.ucl.ac.uk/cortexlab/tools/wheel), Rigbox simplifies hardware/software interfacing and creates a runtime environment in which an experiment's parameters can be easily monitored and manipulated.

Rigbox includes many features including synchronizing recordings, managing experimental data and a viewing model for visual stimuli.

Rigbox is mostly object-oriented and highly modular, making designing new experiments much simpler. Rigbox is currently under active, test-driven development.
Rigbox is a high-performance, open-source MATLAB toolbox for managing behavioral neuroscience experiments. Initially developed to probe mouse behavior for the [Steering Wheel Setup](https://www.ucl.ac.uk/cortexlab/tools/wheel), Rigbox simplifies hardware/software interfacing and creates a runtime environment in which an experiment's parameters can be easily monitored and manipulated. Its many features include synchronizing recordings, managing experimental data and a viewing model for visual stimuli. Rigbox is mostly object-oriented and highly modular, making designing and extending experiments much simpler.

## Requirements

Expand All @@ -16,15 +12,13 @@ For running full experiments Rigbox requires two PCs: one for presenting stimuli
### Software

Rigbox has the following software dependencies:
* Windows Operating System (7 or later, 64-bit)
* MATLAB (2017b or later)
* [Visual C++ Redistributable Packages for Visual Studio 2013](https://www.microsoft.com/en-us/download/details.aspx?id=40784) & [2015-2019](https://github.com/Psychtoolbox-3/Psychtoolbox-3/raw/master/Psychtoolbox/PsychContributed/vcredist_x64_2015-2019.exe) <for Signals>
* The following MathWorks MATLAB toolboxes (note, these can all be downloaded and installed directly within MATLAB via the "Add-Ons" button in the "Home" top toolstrip):
* Data Acquisition Toolbox
* The following community MATLAB toolboxes:
* **OS:** Windows 7 or later, 64-bit
* **MATLAB:** 2018b (v9.5) or later, with the Data Acquisition Toolbox
* **Libraries**: [Visual C++ Redistributable Packages for Visual Studio 2013](https://www.microsoft.com/en-us/download/details.aspx?id=40784) & [2015-2019](https://github.com/Psychtoolbox-3/Psychtoolbox-3/raw/master/Psychtoolbox/PsychContributed/vcredist_x64_2015-2019.exe)
* **MATLAB community toolboxes:**
* [GUI Layout Toolbox](https://uk.mathworks.com/matlabcentral/fileexchange/47982-gui-layout-toolbox) (v2 or later)
* [Psychophysics Toolbox](http://psychtoolbox.org/download.html) (v3 or later)
* [NI-DAQmx support package](https://uk.mathworks.com/hardware-support/nidaqmx.html) <Required if using an NI DAQ>
* [NI-DAQmx support package](https://uk.mathworks.com/hardware-support/nidaqmx.html) (Required if using an NI DAQ)

Additionally, Rigbox works with a number of extra submodules (included with Rigbox):
* [signals](https://github.com/cortex-lab/signals) (for designing bespoke experiments in Signals)
Expand All @@ -34,15 +28,15 @@ Additionally, Rigbox works with a number of extra submodules (included with Rigb

### Hardware

Below are a few minimum hardware requirements for both PCs. These are more of a guide than a requirement as it depends on the type of experiments you wish to run.
Below are a few minimum hardware requirements for both PCs. Precise requirements depend on the type of experiments you wish to run, however most contemporary PC with a dedicated graphics card should suffice.

**Processor:** Intel Core i5-6500 @ 3.0 GHz (or similar)
**Graphics:** NVIDIA Quadro P400 (or similar)
**Memory:** DDR4 16 GB @ 2133 MHz (e.g. Corsair Vengeance 16 GB)
**Processor:** Intel Core i5-6500 @ 3.0 GHz (or similar)
**Graphics:** NVIDIA Quadro P400 (or similar)
**Memory:** DDR4 16 GB @ 2133 MHz (e.g. Corsair Vengeance 16 GB)

## Installation

Below are short instructions for installing Rigbox for users familiar with Git and MATLAB. For detailed instructions, please see the [installation guide](https://cortex-lab.github.io/Rigbox/intall.html).
Below are short instructions for installing Rigbox for users familiar with Git and MATLAB. For detailed instructions, please see the [installation guide](https://cortex-lab.github.io/Rigbox/install.html).

Before starting, ensure the above toolboxes and packages are installed. PsychToobox can not be installed via the MATLAB AddOns browser. See [Installing PsychToobox](#Installing-PsychToolbox) for install instructions.

Expand All @@ -52,13 +46,10 @@ It is highly recommended to install Rigbox via the [Git Bash](https://git-scm.co
```
git clone --recurse-submodules https://github.com/cortex-lab/Rigbox
```
2. Run the `addRigboxPaths.m` function in MATLAB (found in the Rigbox directory) then restart the program. This adds all required folders and functions to your MATLAB path. *Note*: Do __not__ manually add all Rigbox folders and subfolders to the paths!**
2. Run the `addRigboxPaths.m` function in MATLAB (found in the Rigbox directory) then restart the program. This adds all required folders and functions to your MATLAB path**. __NB__: Do __not__ manually add all Rigbox folders and subfolders to the paths

\* Accepting all installer defaults will suffice.
** To add the paths temporarily for testing:
```
addRigboxPaths('SavePaths', false, 'Strict', false)
```
** To add the paths temporarily for testing, run `addRigboxPaths('SavePaths', false, 'Strict', false)`

### Installing PsychToolbox

Expand All @@ -73,27 +64,18 @@ DownloadPsychtoolbox('C:\') % Install to C drive
```

## Getting started
After following the installation instructions you can start playing around with Rigbox and Signals. To run one of the example experiments, open MATLAB and run `eui.SignalsTest();`, then select 'advancedChoiceWorld.m'.
After following the installation instructions you can start playing around with Rigbox and Signals. To run one of the example experiments, open MATLAB and run `eui.SignalsTest();`, then select 'advancedChoiceWorld.m'.

Full Rigbox documentaion can be found at [https://cortex-lab.github.io/Rigbox/](https://cortex-lab.github.io/Rigbox/).
To get an idea of how experiments are run using the Rigbox Signal Experiment framework see [Playing Around With Signals](https://cortex-lab.github.io/Rigbox/using_test_gui.html).
To run the example experiments from the Rigbox paper, see [Running Paper Examples](https://cortex-lab.github.io/Rigbox/paper_examples.html).
![](https://github.com/cortex-lab/Rigbox/blob/master/docs/html/images/SignalsTest%20GUI%20Example.gif)

### Running an experiment
For running experiments, edit your `+dat.paths.m` file to set paths for saving config files and experiment data. A template can be found in [docs/setup/paths_template.m](https://github.com/cortex-lab/Rigbox/blob/master/docs/setup/paths_template.m). Then configure the hardware by following the instructions in the [Configuring hardware](https://cortex-lab.github.io/Rigbox/hardware_config.html) guide. This will guide you through configuring a visual viewing model, configuring audio devices and setting up hardware that requires a DAQ.
Full Rigbox documentation can be found at [cortex-lab.github.io/Rigbox](https://cortex-lab.github.io/Rigbox/).

On the stimulus computer (SC), run:
```
srv.expServer
```
This opens up a new stimulus window and initializes the hardware devices
To run the example experiments from the Rigbox paper, see [Running Paper Examples](https://cortex-lab.github.io/Rigbox/paper_examples.html).

On the master computer (MC), run:
```
mc
```
For more infomation on using the Signals Test GUI see [this guide](https://cortex-lab.github.io/Rigbox/using_test_gui.html).

This opens the MC GUI for selecting a subject, experiment, and the SC on which to run the experiment. The MC GUI also allows for editing some experimental parameters and logging into the Alyx database (optional). Rigbox comes with some experiments, namely ChoiceWorld and some Signals experiments found in the submodule's [documentation folder](https://github.com/cortex-lab/signals/tree/master/docs). Signals experiments are run by selecting '<custom..>' from the experiment drop-down menu and navigating to the desired experiment definition function. To launch the experiment on the selected SC, press 'Start'.
### Running an experiment
For running full experiments see the [Setting up experiments](https://cortex-lab.github.io/Rigbox/index.html#2) guide. This will guide you through configuring a visual viewing model, configuring audio devices and setting up hardware that requires a DAQ.

Information specific to the steering wheel task can be found on the [CortexLab website](https://www.ucl.ac.uk/cortexlab/tools/wheel).

Expand Down Expand Up @@ -123,5 +105,4 @@ For further information, see [our publication](https://www.biorxiv.org/content/1
* [Psychophsics Toolbox](http://psychtoolbox.org) for code pertaining to visual stimulus presentation
* [NI-DAQmx](https://uk.mathworks.com/hardware-support/nidaqmx.html) for code pertaining to inerfacing with a NI-DAQ device
* [TooTallNate](https://github.com/TooTallNate/Java-WebSocket) for code pertaining to using Java Websockets
* [Andrew Janke](https://github.com/apjanke) for the `isWindowsAdmin` function
* [Timothy E. Holy](http://holylab.wustl.edu/) for the `distinguishable_colors` function
2 changes: 1 addition & 1 deletion addRigboxPaths.m
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function addRigboxPaths(varargin)

%%% Remind user to copy paths file %%%
if ~exist('+dat/paths','file')
template_paths = fullfile(root, 'docs', 'setup', 'paths_template.m');
template_paths = fullfile(root, 'docs', 'scripts', 'paths_template.m');
new_loc = fullfile(root, '+dat', 'paths.m');
copied = copyfile(template_paths, new_loc);
% Check that the file was copied
Expand Down
Binary file added docs/html/images/SignalsTest GUI Example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/scripts/id_index.m
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@
% Rigbox:exp:SignalsExp:noTokenSet
%
% Rigbox:eui:choiceExpPanel:toolboxRequired
% signals:test:toolboxRequired
% Rigbox:setup:toolboxRequired
%
% Alyx:newExp:subjectNotFound
Expand Down

0 comments on commit d7d83dd

Please sign in to comment.