
SX TOOLS
========

The SX Tools are intended to provide users with an easy and powerful
interface to the SX. This is version v2.3.18.


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

1. In order for everything to compile, you need to set the CC environment
   variable to your ANSI C compiler. Usually, this is already set (cc for
   unix, gcc for linux) just check with echo $CC.

2. The FITS routines require CFITSIO to be installed. You can get CFITSIO
   from 

      http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html

   Be sure to set the environment variable CFITSIO_DIR to the directory
   where CFITSIO has been installed.
   If you don't need the FITS interface, just build nofits (see below).

3. Invoke 

     make PLATFORM

   where PLATFORM may be any of  sdss,linux, solaris, osf, irix.
   'sdss' will install the makefiles intended to be used with sdssmake,
   the other keywords install the makefiles for the respective platform
   to be used with make.
   There is no reason why sxTools would not compile on other platforms,
   but these are the platforms for which we have Makefiles. See the
   src and app directories and generate Makefiles for your platform
   if yours is not in the list (and you don't want to use sdssmake.)

   After that, invoke either sdssmake or make. The following targets
   are accepted:

   all     compile and link everything
   clean   delete .o files, libraries and executables
   nofits  compile and link without the fits dependency


 C UTILITIES
--------------

   These are the utilities available in sxTools/bin after make has completed:

.........

   sxAsciiEcho [-f filename] [-p port]

   Waits on a port (defaults to 8010) to accept a connection from
   the SX server. In the sxQT, the output can be sent to a socket
   using the Output..Remote socket.. menu item. Specify your host
   and port where the sxAsciiEcho is running.

   Every line it receives from the SX server are sent to stdout or
   to the file if the -f option was specified.


.........

   sxFitsEcho filename [-p port]

   Same as sxAsciiEcho except that a binary FITS table is created
   as the output. CFITSIO needs to be installed for this to work.


.........


   sxRegister engineID -l username [-h host -p port -d daemonhost -t daemonport]

    engineID   :  the name of this routine given to the port daemon
    -l username:  username to log in
    -h host    :  host to run on - default this host
    -p port    :  port number to run from - default 2010
    -d dhost   :  name of port daemon host - defaults to $SX_PORTDEAMON_HOST
    -t dport   :  number of port daemon port - defaults to $SX_PORTDEAMON_PORT


    Registers an ID with the port daemon. Useful if you want to protect
    your analysis engine and require authenticated connections to it.



 C API
-------


   There are several functions/structures defined for you to use in
   applications. Documentation for now is in the include/*.h files
   only, but soon will be found on http://www.sdss.jhu.edu/



 BUG REPORTING
---------------

   Please use the usual bug reporting system on gnats to report bugs on

	http://www.astro.princeton.edu:81/cgi-bin/gnatsweb.pl




Ani Thakar & Dennis Dinge
Johns Hopkins University
thakar@pha.jhu.edu
ddinge@pha.jhu.edu

