Installation-preJuly2010
1. Unarchive the code (for example, unzip if your package came as a zip) and decide where it will live on your drive; for this example, we'll assume you chose e:\mytools\ and that it is a windows path (would be /e/mytools/ on Mac OS X or another type of unix operating system for example). Go ahead and put the directories there. We'll refer to this directory casually as VHTOOLSPATH.
2. If the computer will be a visual stimulus computer or will otherwise use the Psychophysics Toolbox, install the Psychophysics Toolbox. Finally, make sure the display properties on the stimulus monitor are correct (on Mac OS 9, 256 colors and 800x600 resolution at 100Hz is a good choice) before you run Matlab. If the second monitor isn't recognized, note that the monitor needs to be connected and ON at bootup for a Mac OS 9 computer to recognize it, maybe that is the issue.
3. Edit the configuration files in the calibration directory under the VHTOOLSPATH directory as needed (it's probably needed). Typical edits are described below.
If your computer will be a stimulus computer or other type of slave computer, then you'll need to edit NewStimCalibration.m. Set Remote_Comm_isremote to 1, make sure Remote_Comm_enable is 1, and Remote_Comm_method is usually 'filesystem'. Next, if you are using 'filesystem', you need to establish the common directory where the slaves and master computer will exchange files; maybe this will be fitzdata\remote\999H if you work in room 999 and there are already rigs labeled A-G. Next, you need to figure out how the stimulus computer can write to this common directory; maybe it is drive z for the stimulus computer; then set Remote_Comm_dir = 'z:\remote\999H\', or wherever it should be. Note that you need to have a trailing file separator (\ on Windows, / on Mac OS X/Unix, : on Mac OS 9) and that you should use whatever file separators are appropriate for the slave computer's operating system. For example, on Mac OS 9, you'd use 'fitzdata:remote:999H:'.
If your computer will be an acquisition computer or other type of "master" computer that issues complex instructions to slave computers, you'll need a different NewStimCalibration.m configuration, and you'll also need to edit local2remote.m. In NewStimCalibration.m, set Remote_Comm_isremote to 0, and then configure the rest of NewStimCalibration as above in Step 3.1. Next, edit local2remote.m so that it will convert a path from the "master" computer to the "slave" computer. For example, if the "master" computer is a PC, the common path might be 'z:\remote\999H\', but on a stimulus computer that is a Mac OS 9 machine, then that Mac might refer to the same directory as 'fitzdata:remote:999H:'. Edit fs so it searches for the file system on the "master" computer (e.g., 'z:' for a PC), edit currfilesep to be the file separator of the master machine (e.g., '\' for a PC), and remotefilesep to be the file separator for the remote system (e.g., ':' for an OS 9 Mac).
If your computer will be performing 2-photon analysis, then edit TwoPhotonCalibration.m to reflect the acquisition system and synchronization methods you will be using (usually TwoPhotonPlatform is 'PrairieView', usually TwoPhotonSynchonization is 'generic' for none or 'Fitzpatrick' for the Fitzpatrick lab methods using Spike2).
Under normal circumstances, FitzLabCalibration.m and NelsonLabToolsInitLocal.m require no editing.
4. Start Matlab. Create a file called startup.m in your default Matlab directory (maybe it is C:\yourusername\documents\matlab\ or something similar). If you already have a startup.m file for other programs, you can simply add this to your existing startup.m file. Add the following 6 lines:
mydir = pwd; % save the directory where we are currently
cd('VHTOOLSPATH'); % change directories to the tool path
% use your actual directory instead of VHTOOLSPATH
vhtools_startup(pwd,pwd); % installs directory paths and initializes objects
cd(mydir); % changes back to the previous directory
clear mydir; % clears the variable mydir
If you use Mac OS X or unix, you can put startup.m wherever you like and edit your MATLABPATH variable to include this path; for example, you could add EXPORT MATLABPATH=.:/Users/vanhoosr/tools/matlab to your .bashrc file.
5. Test it out. Exit Matlab and re-run it. You may get warnings about directories not being present, but there should be no errors.
Development notes for Steve (everyone else can ignore):
1. local2remote.m should be moved into the NewStim package, and its parameters should be adjusted in NewStimCalibrate.m
2. NewStimCalibrate should have instructions embedded within the file to make it easier for the user to edit these fields
3. vhtools_startup should be smarter about handling the psychophysics toolbox installation