*****************************************************************
* CIAO Contributed Scripts README				*
*								*
* CIAO Version 3.2						*
* December 2004							*
*****************************************************************


----------
DISCLAIMER
----------

THESE SCRIPTS ARE NOT PART OF CIAO.  THEY ARE PROVIDED "AS IS",
AND THE CHANDRA X-RAY CENTER IS UNDER NO OBLIGATION TO SUPPORT
THEM.  THE USER ASSUMES ALL RESPONSIBILITY FOR THE RESULTS
OBTAINED BY USING THESE SCRIPTS.

Although the CXC does not officially support these scripts, we
do try to keep them up-to-date and bug-free.  Updates are posted
on the scripts download page: 
http://cxc.harvard.edu/ciao/download/scripts/


--------------------------
CIAO VERSION COMPATIBILITY
--------------------------

This scripts package is designed for use with CIAO 3.0.2 or later.
We strongly encourage all users to upgrade to the latest version 
of CIAO.


------------
INSTALLATION
------------

Overview
========

The CIAO_scripts.tar file is a tar archive that is designed to be
unpacked in $ASCDS_INSTALL, the root directory of the CIAO 
installation.  If you do not have write permission in 
$ASCDS_INSTALL, you will need to ask your system administrator to
install these scripts.

The tarball unpacks into the "contrib" subdirectory of 
$ASCDS_INSTALL.  Within $ASCDS_INSTALL/contrib, the script
files are distributed among five subdirectories.  (If
$ASCDS_INSTALL/contrib or any of its subdirectories do not
exist, tar will create them.)  The directories and their associated
contents are as follows:

$ASCDS_INSTALL/contrib/bin
    Executable scripts, run from the command line

$ASCDS_INSTALL/share/slsh/local-packages/
    S-Lang scripts/functions, run from within ChIPS, Sherpa, or an
    slsh script

$ASCDS_INSTALL/contrib/doc/txt
    README files for individual scripts

$ASCDS_INSTALL/contrib/doc/xml
    XML documentation files for individual scripts, viewable in 
    the CIAO ahelp system

$ASCDS_INSTALL/contrib/param
    Parameter files for scripts with parameter interfaces

At present, not all scripts have a parameter interface and/or
supporting documentation. 


Instructions
============

IMPORTANT: If you are still using a pre-3.0.2 CIAO release, you 
should *not* install this package; see the "CIAO VERSION
COMPATIBILITY" section, above.


1) Start CIAO

   The installation instructions are given relative to the CIAO
   environment variable $ASCDS_INSTALL.  You need to be in a window
   running CIAO so that this variable is defined.


2) Uninstall old scripts (required if scripts were installed
   prior to CIAO 3.0.2 release, optional otherwise)

   If you have installed a scripts package released prior to
   CIAO 3.0.2 and have since upgraded to CIAO 3.0.2 or later,
   you *must* uninstall the old files before installing new
   ones.  For newer software installations, you may wish to clear 
   out the directory before installing new scripts.

   Please see the comments in the appropriate uninstall script for
   specific instructions and some warnings about this step.  Both
   uninstall scripts are available on the CIAO web site at
   http://cxc.harvard.edu/ciao/download/scripts/instructions.html#uninstall
   
   To uninstall scripts released prior to CIAO 3.0.2, use the
   script "uninstall_CIAO_scripts_pre_3.0.2":

     unix% cp uninstall_CIAO_scripts_pre_3.0.2 $ASCDS_INSTALL
     unix% cd $ASCDS_INSTALL
     unix% ./uninstall_CIAO_scripts_pre_3.0.2

   If you want to remove a scripts package released for CIAO
   3.0.2 or later, use the script "uninstall_CIAO_scripts",
   also on the scripts download page:

     unix% cp uninstall_CIAO_scripts $ASCDS_INSTALL/contrib
     unix% cd $ASCDS_INSTALL/contrib
     unix% ./uninstall_CIAO_scripts


3) Unpack the tarball

     unix% cp CIAO_scripts.tar $ASCDS_INSTALL
     unix% cd $ASCDS_INSTALL
     unix% tar xvf CIAO_scripts.tar


4) Re-index the ahelp database

   This step allows ahelp (the CIAO help system) to find the
   newly-installed script XML files automatically.  Note that this 
   may take several minutes.

     unix% ahelp -r

   See "ahelp ahelp" for more information on this command.

   Users installing under Mac OSX who do not have root access enabled
   may need to use "sudo" to change the file permissions before
   reindexing: 

     unix% sudo chmod 666 $ASCDS_INSTALL/doc/xml/CXCHelp*

   To prevent corruption, make sure to change the file permissions
   back to "644" after the reindexing is complete.


5) Set path for S-Lang scripts/functions 
   **NO LONGER NECESSARY AS OF CIAO 3.0.2**

   As of version 3.0.2, CIAO tools will automatically find S-Lang
   scripts that are installed in 
   $ASCDS_INSTALL/contrib/share/slsh/local-packages/ .  
   Therefore, there is no need to set the SLANG_SCRIPT_PATH or
   SLANG_MODULE_PATH environment variables for yourself.  

   If you have lines that set these variables in your $HOME/.cshrc,
   $HOME/.profile, or other shell configuration file, please remove
   them, as they may cause you to inadvertently use older versions of
   the S-Lang scripts.


--------------------
FOR MORE INFORMATION
--------------------

For information on running a specific script, see the script's
ahelp page or README file (if available) or the actual text of
the script, which generally includes introductory comments and
usage information.  The installation instructions also have some
general notes on running scripts:
http://cxc.harvard.edu/ciao/download/scripts/instructions.html#run

For links to associated threads, see the scripts download page:
http://cxc.harvard.edu/ciao/download/scripts/index.html#scripts

