The source code for the Tcs system may be obtained from the SVN repository located at the University of Texas at Austin, McDonald Observatory. The machine does not have an anonymous download mechanism and you will need an account on the machine in order to obtain the software. Assumming that you do have an account the command to get the software is
svn checkout svn+ssh://<user>@hetdex-pr.as.utexas.edu/repos/het/trunk
At the HET the main directory for the source code and the operating environment is /opt/het/hetdex. The working copy of the source for the Tcs python scripting package is usually in /opt/het/hetdex/src/tcs/trunk/scripting. The Hetlib library can be found in /opt/het/hetdex/src/tcs/trunk/scripting/hetlib and the scripts can be found in /opt/het/hetdex/src/tcs/trunk/scripting/scripts. Third-party packages are in various sub-directories under /opt/het/hetdex/src. Normally these directories are mounted via NFS from gringotts and should be accessible on all our machines.
The binaries are typically installed in /opt/het/hetdex/bin; the python packages are typically installed in /opt/het/hetdex/lib/python2.7/site-packages; configuration files are typically found in /opt/het/hetdex/etc/conf.
The Tcs Python scripting package requires the numpy, scipy, sqlite3, and zmq python packages to support operations. The Tcs C++ code will require the zeromq and czmq libraries which can be found at zeromq.org.
The Hetlib python module only requires the tcssubsystem package and standard python modules.
The scripts that have been written using Hetlib require a number of additional packages that may not come with the standard python installation. The packages currently required are mysql, numpy, pyephem, matplotlib, and six. Additional packages may be required for future scripts.
Because the executable and libraries are not in one of the standard system locations you will need to modify your environment in order to let the operating system know where to find executable, libraries, and configuration files.
Note that we have a local install of Python 2.7. This was done because the Python 2.6 package available by default from Redhat is woefully behind the times.
If you use the bash shell, then you should include the following lines in your .bashrc file.:
#
# .bashrc setup for HetDex
#
#
# location of third-party and hetdex software executables
#
export HETDEX_DIR=/opt/het/hetdex
#
# location of src tree for Hetdex software source
# (this is only required to build the software)
#
export HET_SRC_ROOT=$HETDEX_DIR/src/tcs/trunk
#
# modify environment variables to gain access to the system
# (this is required to operate the software)
#
export LIBRARY_PATH=$HETDEX_DIR/lib:$HETDEX_DIR/epics/lib/linux-x86_64
export LD_LIBRARY_PATH=$HETDEX_DIR/lib:$HETDEX_DIR/epics/lib/linux-x86_64:$HETDEX_DIR/plugins/designer:$LD_LIBRARY_PATH
export PATH=$HETDEX_DIR/Python-2.7/bin:$HETDEX_DIR/bin:$PATH
export PYTHONPATH=$HETDEX_DIR/lib/python2.7/site-packages:$HETDEX_DIR/lib64/python2.7/site-packages:$PYTHONPATH
If you use csh or tcsh, then include the following in your .cshrc file.:
#
# .cshrc set up for HetDex
#
#
# location of third-party and hetdex software executables
#
setenv HETDEX_DIR /opt/het/hetdex
#
# location of src tree for Hetdex software source
# (this is only required to build the software)
#
setenv HET_SRC_ROOT $HETDEX_DIR/src/tcs/trunk
#
# for third-party software locations
# (this is required to operate the software)
#
setenv LIBRARY_PATH $HETDEX_DIR/lib:$HETDEX_DIR/epics/lib/linux-x86_64
setenv LD_LIBRARY_PATH $HETDEX_DIR/lib:$HETDEX_DIR/epics/lib/linux-x86_64:$HETDEX_DIR/plugins/designer
setenv PATH $HETDEX_DIR/Python-2.7/bin:$HETDEX_DIR/bin:$PATH
setenv PYTHONPATH $HETDEX_DIR/lib/python2.7/site-packages:$HETDEX_DIR/lib64/python2.7/site-packages
Both the Tcs Scripting package and the Hetlib package may be installed with the following commands
cd $HET_SRC_ROOT/scripting
make install
This will install the package files into $prefix/lib/python2.7/site-packages and the scripts in $prefix/bin. This is normally done at Het as the user hetdex.
The Tcs Scripting package is mix of python and C++ libraries. The package can be installed with the following commands,
cd $HET_SRC_ROOT/scripting
python setup.py install --prefix=$HETDEX_DIR
This will install the package files into $prefix/lib/python2.7/site-packages and the scripts in $prefix/bin. This is normally done at Het as the user hetdex.
Hetlib is a pure python package and can be installed with the command
cd $HET_SRC_ROOT/scripting
python hetlib_setup.py install --prefix=$HETDEX_DIR
This will install the module in $prefix/lib/python2.7/site-packages and the scripts in $prefix/bin. This is normally done at Het as the user hetdex.
The documentation is created through the Sphinx documentation system. The source files are located in $HET_SRC_ROOT/scripting/docs.
You can run make to get a list of available target formats. Normally the documentation is built by running make html latexpdf in the ./doc directory. This will build the html pages and the PDF version of the document. The PDF file will be in ./_build/latex/HetPython.pdf while the HTML files can be found in ./_build/html. These files may be installed in the directories of your choice.