XDPhys

by Jamie Mazer, Chris Malek and Ben Arthur

1. Installation Notes
---------------------

1. To compile the xdphys distribution, you must have the following 
	packages, installed and compiled somewhere on your system:

   		sanal.tar.gz
			Spike time analysis routines
		stats.tar.gz
			Statistical routines
		sslib_1.1.8.tar.gz
			Mike Lewicki's spike sorter library
		nr2.tar.Z
			Numerical recipies library

	All these packages are for printing:
		At-psdriver.tar.gz
			At widget set with custom Postscript modifications
		psdriver.tar.gz
			custom postscript code, used by At-psdriver.tar.gz
		epslayout.tgz
			Encapsulated Postscript layout utility
		afm.tar.gz
			Postscript font definitions (for printing with At-psdriver) 
			(** untar the afm.tar.gz package to /usr/local/lib:
				
				su - root
				cd /usr/local/lib
				tar zxf afm.tar.gz
			)
	
	Additionally, if you are running Linux with the Tucker Davis rig,
	you must have

		tdt-driver.tar.gz
			Tucker Davis device driver package

	And, if you are running SunOS with an Ariel S56 DSP board with 
	Proport, you need the s56dsp.01-Sep-93 driver package, s56dsp.tar.gz.

2. Edit ./templates/template.{UNAME} to reflect where you have installed
   the include files and libraries for the above packages, where {UNAME}
   is either Linux or SunOS.

3. In the top level directory, type 'make'.

3a. At this point you should run figure out the adtick-to-mv 
    conversion for your rig, and calibrate your microphones.  
	Hopefully there will be another document in ./docs that details 
	how to do this.

4. To then install the xdphys package, type 'make install'.
   
   If you are installing over an old version, make backup copies of
   your calibration files (<hostname>.kleft.fr, <hostname>.kright.fr and
   <hostname>.addacal.data in /usr/local/lib/xdphys/calib), so that
   they don't accidently get overwritten.

2. Environment Variables
------------------------

For each user of xdphys, in their .profile (bash), .login,.cshrc (csh)
or .login, .cshrc, or .tcshrc (tcsh), you _MUST_ set these environment
variables:

    XDPHYSDIR:   Set this to the directory to which 'make install' tells you
                 to set it, e.g. /usr/local/lib/xdphys.  Tells xdphys, calib
				 where to find microphone calibration files, documentation 
				 and adtick-to-mv conversion files.

If using a SPARC with Ariel S56 board:

    S56DSP:      Set this to the directory where the S56 driver lives,
				 e.g. /usr/local/src/BCE/s56dsp.01-Sep-93

You SHOULD set these:

    DAQPROG:     Set this to the location of 'drpmproc' or 'tdtproc'
                 (whichever one you are using), e.g.
				 /usr/local/bin/xdphys/tdtproc  (for Linux)
				 /usr/local/bin/xdphys/drpmproc  (for SunOS)

These are optional:

	ATTOFF:		 Set this to disable your programmable attenuators.
    RSEED:       Set this to a seed of your choosing for use with the
                 random number generator.

DAQPROG specific environment variables (optional):

	DAQ_DEBUG:     Turn on copious debugging messages from the DAQPROG.
    DAQ_REBOOT:    If set, opens and closes DSP device on each playback/
                   record cycle.  Not used by tdtproc. 
    DAQ_LOOPBACK:  If set, copies output->input buffers, but does not 
                   actually send anything to the equipment.
    DAQ_SYNCPULSE: If set, force generation of sync pulses on /dev/audio
                   (only used if drpmproc was compiled with -DAUDIO). 
                   Not used by tdtproc.
    DAQ_FAKE_A:    If set to <filename>, tells the DAQPROG to simulate 
                   taking data from the left AD channel by reading the 
				   binary file named by <filename>.  The binary file 
				   should contain 16 bit samples, and can be of any length.
    DAQ_FAKE_B:    Same as DAQ_FAKE_A, but causes DAQPROG to simulate
                   taking data from the AD right channel.
	DAQ_LODFIL:	   Set this to the name of S56 ".lod" file you want to use 
	               for your Ariel S56 board.  Not used by tdtproc.
	DAQ_NOIO:	   Simulate doing data acquisition, but don't actually
	               talk to the DAQ hardware
	DAQ_VERBOSE:   Send more verbose messages to the syslog (tdtproc only)
	               
	             
------------------------------------------------------------

Directories:

	./templates/
	  Platform specific defines used during compilation and installation
	  of the xdphys package.

	./src/
	  The source code for the xdphys package.  Duh.

	./iserver/
	  DAQ hardware interface library, and testing software

	./iserver/tdtproc/
	  DAQ support for Linux with Tucker Davis equipment.

	./iserver/drpmproc/
	  DAQ support for SPARC with Ariel S56 DSP board and Proport.

	./bin/
	  The compiled binaries end up in ./bin/${UNAME}. ./bin/ also 
	    contains some printing scripts.

	./lib/
	  The internal xdphys libraries (libiserver.a, for now) end up in
	  ./lib/${UNAME}.

	./calib/
	  Files used for microphone calibration and adtick-to mv conversion.

	./doc/
	  Documentation!

	./ad/
	  X-Resource tables (for generating XDowl and XDowl-color)
	  nothing magic here -- just things I tend to use frequently and I
	  think others might find useful.

$Id: INSTALL,v 1.5 1999/05/28 18:15:26 cmalek Exp $
