The Ciao2.2.1 binaries provide all the required utilities to extract,
process, analyze, and plot Chandra data.  These binaries include the
ability to import the ISIS spectral analysis package into Sherpa, as
well as integrate S-Lang scripts into CIAO analyses.  However, some
users might find it convenient to have the ISIS and S-Lang packages
compiled as stand-alone utilities.  This can be readily achieved with
the directories and source code within the "Off-the-Shelf" (ots) tar
file included among the optional files within the Ciao2.2.1 release.
(Note: S-Lang comes pre-packaged on many linux systems; however, the
ots tar file has the version used to create the Ciao2.2.1 binaries,
which is more recent than the version included with some linux
releases.)

Installing these utilities is relatively straightforward on a linux
system, as we describe below.  Assuming that Ciao2.2.1 is installed in
the directory /ciao_2.2.1, proceed as follows.

    1) Go to the directory in which Ciao has been installed.

       > cd /ciao_2.2.1

    2) Untar the ots tar file.

       > tar xvf /dev/rmt/0 (or whatever your device name is)
       (if loading from a tape/CD)

       OR

       > tar xvf cxc_ots_linux.tar
       (if loading from a downloaded/unzipped tar file)

       This will create the directory /ciao_2.2.1/ots, which contains
       subdirectories for ISIS, S-Lang, CFITSIO, and PGPLOT, all of
       which will be required to build ISIS.

    3) Change directories to the CFITSIO directory, configure and then
       run the make file.

       > cd cfitsio.2.202
       > ./configure
       > ./make

    4) Change directories to the S-Lang directory, configure and
           then run the make file.

       > cd ../slang.v1.4.4
       > ./configure
       > ./make

       For further information regarding S-Lang, see:
       http://www.s-lang.org

    5) Change directories to the PGPLOT directory.

       > cd ../pgplot

       The make procedure for pgplot is slightly more complicated;
       however, some of the usual steps (such as selecting device
       drivers) have already been taken for the purposes of building
       PGPLOT for use with Ciao2.2.1.

       First, use 'makemake' to create the makefile for building the
       pgplot distribution.

       > ./makemake /ciao_2.2.1/ots/pgplot linux g77_elf

       The first arugment above is the directory for the source
       distribution, the second is identifying the operating system
       for which the distribution is being built, and the final
       argument lists the Fortran and C compilers that will be used to
       create the libraries.  Other combinations such as f77_gcc or
       g77_gcc exist; however, the above has been used successfully in
       RedHat Linux 7.1.

       Next, use make to create the code, and then, optionally, use
       make to clean intermediate step files from the directory.

       > ./make
       > ./make clean

       Finally, use make to create the C bindings for PGPLOT.

       > make cpg

       Several environment variables have to be set in order to use
       the PGPLOT routines (as well as to build ISIS, as described
       below).  Specifically in C shells or tcsh:

       > setenv PGPLOT_DIR /ciao_2.2.1/ots/pgplot/
       > setenv LD_LIBRARY_PATH /ciao_2.2.1/ots/pgplot/

       Or in bash shells:

       > PGPLOT_DIR="/ciao_2.2.1/ots/pgplot/"; export PGPLOT_DIR
       > LD_LIBRARY_PATH="/ciao_2.2.1/ots/pgplot/"; export LD_LIBRARY_PATH

       Note that if one first runs the Ciao2.2.1 start-up script, the
       PGPLOT_DIR is automatically set to the above, while the
       LD_LIBRARY_PATH variable needs to be appended to include the
       above path, i.e., for C shells

       > setenv LD_LIBRARY_PATH "/ciao_2.2.1/ots/pgplot:$LD_LIBRARY_PATH"

       or for tcsh,

       > setenv LD_LIBRARY_PATH {/ciao_2.2.1/ots/pgplot}:{$LD_LIBRARY_PATH}

       or for bash shells,

       > LD_LIBRARY_PATH="/ciao_2.2.1/ots/pgplot:$LD_LIBRARY_PATH"
       > export LD_LIBRARY_PATH

       One can check to see that PGPLOT is correctly working by
       running the demos, e.g.,

       > ./pgdemo1

       and giving /XWINDOW as the display window environment.

    6) Change to the ISIS directory and configure the make file.

       > cd ../isis
       > ./configure

       The file site.def then must be edited to give the locations of
       the S-Lang, CFITSIO, and PGPLOT libraries.  Specifically, after
       editing, site.def should look like the following.

SLANGINC = /ciao_2.2.1/ots/slang.v1.4.4/include# directory containing slang.h
SLANGLIB = /ciao_2.2.1/ots/slang.v1.4.4/lib# directory containing libslang.a (or .so)

FITSINC = /ciao_2.2.1/ots/cfitsio.2.202# directory containing fitsio.h
FITSLIB = /ciao_2.2.1/ots/cfitsio.2.202# directory containing libcfitsio.a

PGPLOTINC = /ciao_2.2.1/ots/pgplot# directory containing cpgplot.h
PGPLOTLIB = /ciao_2.2.1/ots/pgplot# directory containing libpgplot.a (or .so)

       Then run the make file, following the instructions.  Specifically:

       > ./make
       > ./make clean

       To use ISIS, the compiled code must be added to one's path
       environment variable.  Specifically, in C shells

       > setenv PATH "$PATH:/ciao_2.2.1/ots/isis/bin/"

       or for tcsh,

       > setenv PATH {$PATH}:{/ciao_2.2.1/ots/isis/bin/}

       or in bash shells

       > PATH="$PATH:/ciao_2.2.1/ots/isis/bin/"
       > export PATH

       ISIS is then ready to be used in a stand alone configuration.
       For further descriptions of ISIS, consult the manuals located
       at: http://space.mit.edu/ASC/ISIS/