RJTOOLS -- Rolf A. Jansen's miscellaneous tasks & tools package RJTOOLS is a package of IRAF CL scripts and a few auxilliary compiled tasks, that I developed over the years while at the Kapteyn Laboratory, CfA, ESA's ESTEC and presently at ASU, and were sufficiently useful to me to think that they might be of more general use. About half of them are low-level tasks, meant to be used as part of scripts. Many of these tasks return the result of their action as task parameters (and sometimes, optionally, to the standard output and/or a text log file as well). This effectively allows easy nesting of tasks and building quite complex scripts (rather than having to resort to programming directly in SPP, Fortran or C), and surpasses the capabilities of using pipes to pass the output of one task to the input of another. The tasks are transparantly grouped into several sub-packages and were tested under IRAF v2.11.3--v2.12.2, but if you find any bugs or if you improved any of these tasks I would like to hear from you. Finally, this code is provided as is and no suitability for any purpose, exis- ting or future, is claimed nor implied, nor will any liability for the use or mis-use of this product ever be accepted be neither the author nor any of his former, current or future employers. Reselling for profit or hiding or attemp- ting to hide the source code, or patenting or attempting to patent any of the code, or use for military purposes is strictly forbidden. Otherwise and whereever this blurb is unclear, incomplete, untenable or plain nonsense, the provisions of the GNU General Public License will apply to this product. Share and Enjoy! Rolf A. Jansen -- Tempe (AZ) Aug 25 2004 RELEASE INFORMATION ============================================================================= Tue Aug 11 18:00:00 MST 2003 --> version = 11Aug2003 Initial public version for IRAF v2.12.1 (rjtools_v2.12) (RAJ). Wed Dec 10 18:00:00 MST 2003 --> version = 10Dec2003 Release including 'tvtools/ctrcoo.cl' and updated man pages and 'apropos' database. (RAJ). Tue Aug 25 18:00:00 MST 2004 --> version = 25Aug2004 Release including 'markall'/'tvmarkall' and 'imregister', with updated 'help' pages and 'apropos' database (RAJ). INSTALLATION INSTRUCTIONS ============================================================================= Installation of this external package consists of obtaining the files, creating a directory containing the package, compiling the executable(s) or installing precompiled executable(s), and defining the environment to load and run the package. The package may be installed for a site or as a personal installation. [arch] In the following steps, you will need to know the IRAF architecture identifier for your IRAF installation. This identifier is similar to the host operating system type. The identifiers are strings like "ssun" for Solaris, "alpha" for Dec Alpha, and "linux" or "redhat" for most Linux systems. The IRAF architecture identifier is defined when you run IRAF. Start the CL and then type cl> show arch .redhat This is the value you need to know, but without the leading '.', i.e. the IRAF architecture is "redhat" in the above example. [1-site] If you are installing the package for site use, login as the 'iraf' user and edit the IRAF file defining the packages, i.e., hlib$extern.pkg % cd $hlib % vi extern.pkg Define the environment variables rjtools to be the pathname to the rjtools package root directory. The UNIX pathnames MUST be terminated with a '/'. Edit extern.pkg to include the following. reset rjtools = //rjtools/ task rjtools.pkg = rjtools$rjtools.cl Where "" is the place you unpacked the package distribution files. Near the end of the extern.pkg file, update the definition of helpdb so it includes the rjtools help database, copying the syntax already used in the string. Add this line before the line containing a closing quote: ,rjtools$lib/helpdb.mip\ [1-personal] If you are installing the package for personal use define a host environment variable with the pathname of the directory where the package will be located (needed in order to build the package from the source code). Note that pathnames must end with '/'. For example: % setenv rjtools /local/rjtools/ In your login.cl or loginuser.cl file make the following definitions somewhere before the "keep" statement. reset rjtools = /local/rjtools/ task rjtools.pkg = rjtools$rjtools.cl printf ("reset helpdb=%s,rjtools$lib/helpdb.mip\nkeep\n", envget("helpdb")) | cl flpr If you will be compiling the package, as opposed to installing a binary distribution, then you need to define various environment variables. The following is for Unix/csh which is the main supported environment. # Example % setenv iraf /iraf/iraf/ # Example path to IRAF root % source $iraf/unix/hlib/irafuser.csh # Define rest of environment % setenv IRAFARCH ssun # IRAF architecture where you need to supply the appropriate path to the IRAF installation root in the first step and the IRAF architecture identifier for your machine in the last step. [2] Login into IRAF. Create a directory to contain the package files. This directory should be outside the standard IRAF directory tree (e.g., /iraf/extern/). cl> mkdir rjtools$ cl> cd rjtools [3] The package is distributed as a gzip-compressed tar archive with both the sources and, for select host computers, executables. Note that IRAF includes a tar reader. The tar file is most commonly obtained via anonymous ftp. Below is an example from a linux box: cl> ftp iraf.noao.edu (140.252.1.1) login: anonymous password: [your email address] ftp> cd iraf/contributed ftp> get rjtools.readme ftp> binary ftp> get rjtools.tar.gz ftp> quit The readme file contains these instructions. Alternatively, the tar file may be obtained at URL: http://www.public.asu.edu/~rjansen/iraf/rjtools.tar.gz [4a] Extract the source files from the tar archive using 'rtar': cl> softools cl> !(g)unzip rjtools.tar.gz (GNU: gunzip, otherwise: unzip) so> rtar -xrf rjtools.tar so> bye On some systems, an error message will appear ("Copy 'bin.generic' to './bin fails") which can be ignored. Sites should leave the symbolic link 'bin' in the package root directory pointing to 'bin.generic' but can delete any of the bin. directories that won't be used. If there is no binary directory for the system you are installing it will be created when the package is compiled later or when the binaries are installed. [4b] Alternatively, (GNU) tar may be used to extract the source files: % (g)tar -xvpzf rjtools.tar.gz or: % (g)unzip rjtools.tar.gz % (g)tar -xvpf rjtools.tar The tar file can be deleted once 'rjtools' is successfully installed. [5] If no pre-built executables are available in the 'bin./' subdirectory appropriate for your machine architecture, you now have to build the few package executables. First go to the package root directory with cl> cd rjtools If you are updating to a newer version and you earlier built the libraries and executables it is necessary to delete these. Otherwise, depending on the dates of files in the new version and the locally built libraries, it may cause the new version to be ignored. To do this the package is configured "generic" which puts all the binary files in one binary directory, the files are deleted and then you continue in the same way as a completely new installation. cl> mkpkg -p rjtools generic cl> delete bin./* # Substitute redhat, ssun, alpha, etc. Configure the package for the particular architecture to be built. cl> mkpkg -p rjtools # Substitute redhat, ssun, etc. This will change the bin link from bin.generic to bin.. The binary directory will be created if not present. If an error occurs in setting the architecture then you may need to add an entry to the file "mkpkg". Just follow the examples in the file. To create the executables and move them to the binary directory: cl> mkpkg -p rjtools # build the executables cl> mkpkg -p rjtools generic # restore generic setting Check for errors. If the executables are not moved to the binary directory then step [1] to define the path for the package was not done correctly. The last step restores the package to a generic configuration. This is not necessary if you will only have one architecture for the package. This should complete the installation. You can now load the package and begin testing and use. As final note: in order to find the tasks in the 'rjtools' package using 'stsdas.apropos', its database needs to be updated. Since the 'apropos' is a simple ASCII text file, all that needs to be done is to append file 'rtools$lib/apropos.db' to 'stsdas$lib/apropos.db' as the 'iraf' user: cl> type rjtools$lib/apropos.db dev=txt >> stsdas$/lib/apropos.db ================================ R.A. Jansen ================================