About the VH Lab software distribution:

The VH Lab software distribution comes in two parts: vhtools and vhtools_thirdparty.

  1. The vhtools distribution is a set of Matlab toolboxes, libraries, and applications that have been written by our lab or our collaborators that performs many operations, including a) running visual stimulus software, b) extracting and analyzing neural voltage data or functional imaging data, and c) various data analysis tasks.

  2. The vhtools_thirdparty distribution contains many libraries and functions that are freely available but were written by other people, and is collected for ease of installation. Some of the vhtools routines require the vhtools_thirdparty libraries and functions.

Usage notes:

At this time, we are allowing access to our collaborators who request access. Please don't pass on the software without our permission, as we would need to secure permission from all of the authors of this code before distributing broadly. It is our goal to distribute more broadly in the future.

Manual method: installation for typical users (the currently recommended way):

  1. Download and install Bazaar for your computer (see tips here). If Matlab is running, you'll need to quit and restart it after installing bazaar (so that Matlab will know about Bazaar).

  2. On Macs or Linux, go to the command line in Terminal. When asked for a password, you'll need to know that the password for the user vhtools1 (on our internal page). Run the commands:

  3. mkdir /Users/[yourusername]/tools

  4. cd /Users/[yourusername]/tools

  5. bzr branch s

  6. bzr branch s

  7. On the PC, choose "Run" from the Start menu and type "command". It should bring up a DOS shell. Then run:

  8. mkdir C:\Users\[yourusername]\Documents\MATLAB\tools

  9. cd C:\Users\[yourusername]\Documents\MATLAB\tools

  10. bzr branch s

  11. bzr branch s

  12. Open Matlab, and create a new m-file called startup.m and save it in [YOURUSERPATH]/Documents/MATLAB. Add the following 6 lines:

    1. mydir = pwd; % save the directory where we are currently

    2. cd('VHTOOLSPATH/VH_matlab_code'); % change directories to the tool path

    3. % use your actual directory instead of VHTOOLSPATH, use a \ slash for Windows

    4. vhtools_startup(pwd,1); % installs directory paths and initializes objects

    5. cd(mydir); % changes back to the previous directory

    6. clear mydir; % clears the variable mydir

  13. On the Matlab command line, type startup. You may be asked to select default options for some configurations; you can normally just choose the defaults, except do pay attention to the 2-photon microscope that you may have.

Alternative Method: Using the Lab Installer (not recommended due to issues on Windows)


    1. Download and install Bazaar for your computer from the Bazaar Downloads page. If Matlab is running, you'll need to quit and restart it after installing bazaar (so that Matlab will know about Bazaar).

    2. Download our installer vhtools_installer.m. On Macs, put this file on the Desktop. On PCs, click on the My Computer icon (accessible on the Desktop or the Start menu), and create a folder called toolbox. Move the vhtools_installer.m to the C:\toolbox folder.

    3. Open Matlab. On Macs, go to the command line and type: cd ~/Desktop; vhtools_installer

    4. On PCs, go to the command line and type cd C:\toolbox; vhtools_installer

    5. Most users can just go ahead and click the Install/Update button. You will be prompted for a password for the default username of vhtools1. The password is available on our internal webpage.

Note for users that have a previously-installed version of vhtools:

    1. Before installing, please rename your existing vhtools directory so it won't be found (you could rename it to vhtools_old).

    2. If you do not use a startup.m file for anything other than initializing vhtools, please rename it to startup0.m; the installer will automatically create a new startup.m file for you. If you do use your startup.m file for other purposes, then after installing you will need to edit the pathname in your startup.m file to match what the installer recommends. The installer will pop up a window that shows exactly how you should edit the startup.m file.


    1. With Matlab open, go to the command line and type vhtools_installer

    2. Click the Install/Update button. You will be prompted for a password for the default username of vhtools1. The password is available on our internal page.

That's it (like the old Apple commercials..."there's no step 3!")

Common problems with the installer:

We are working to make the installer as easy and painless as possible, but we've heard of some problems.

    • If Matlab can't find Bazaar: Try quitting and restarting Matlab. (If you install Bazaar while Matlab is still running, you should quit and restart Matlab so Matlab will know where to find Bazaar.). You might need to start Matlab using X11 by typing in "open -a MATLAB_R2012a". The exact name for Matlab on your system may not be the same depending on the version you are using.

    • If you get an error that says "unable to obtain lock": you'll have to delete the entire directory (vhtools or vhtools_thirdparty) and re-install. This usually occurs when there is an error during installation, such as if a previous install was interrupted while in progress.

    • If you get an error on Windows that says "unable to authenticate to SSH host": simply try again a few times. For unknown reasons, there seems to be some issue with the version of SSH that comes with Bazaar.

For developers:

Please see the installation instructions in the section Developers: Setting up to perform development of vhtools and initial install