RJTOOLS v2.12

rjtools is an external layered package built for NOAO's IRAF (Image Reduction and Analysis Facility) software system for the reduction and analysis of astronomical data. The rjtools package contains several sub-packages with IRAF CL scripts and a few auxilliary compiled tasks, that were developed over the years while at the Kapteyn Astronomical Institute, the Harvard-Smithsonian Center for Astrophysics, ESA's ESTEC and presently at the Arizona State University.

Some scripts add additional functionality to existing equivalent tasks built into IRAF, and many return the result of their actions as task parameters (and sometimes, optionally, to the standard output and/or text log file). This makes nesting of tasks and building quite complex scripts easier (and avoids 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 transparently 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, these tasks are provided as is in the hope that they will be useful, but no suitability for any particular purpose, existing of future, is claimed nor implied, nor will any liability associated in any way to the use or mis-use of this product ever be accepted by neither the author nor any of his former and/or current employers. Reselling for profit or hiding or attempting to hide the source code, or patenting or attempting to patent any of this code, or use for military purposes are 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

Getting a copy of RJTOOLS v2.12

rjtools (current version: 12Jul2007) may be downloaded as a single gzip-compressed tar archive here (~250 kb).

As user 'iraf' (IRAF administrator account), gunzip and untar the compressed tar archive in the /iraf/extern/ directory of your iraf installation, then follow the directions in 'rjtools_2.12/rjtools.readme'. This 'readme' file (which also includes instructions for a personal install) is also available here. It is installed like any other external layered package, and pre-compiled binaries for task 'arg' are provided for several platforms (Redhat7.x/8/9/RHE4.3 and SuSE6.2 linux, Solaris 2.5/6, HPUX, DEC Alpha, and MacOS10.4[Intel]). In short:

          cd /iraf/extern/

          gunzip rjtools_2.12_version.tgz         (Unix and Linux)
          tar xvpf rjtools_2.12_version.tar
    or:
          gtar -xvpzf rjtools_2.12_version.tgz    (Linux)

Then, tell IRAF about the existence of the rjtools package, by inserting the following lines in file /iraf/iraf/unix/hlib/extern.pkg before the definition of the helpdb paths:

reset   rjtools         = /iraf/extern/rjtools_2.12/
task    rjtools.pkg     = rjtools$rjtools.cl
and in the definition of the helpdb paths, add:
                         ,rjtools$lib/helpdb.mip\
Task 'sysinfo' requires a username to be defined. To do so, add a line to the default login.cl file, e.g., directly following the line defining the 'userid' (in fact, it may be a copy of that line):
set     userid          = "jdoh"
set     username        = "John/Jane D'Oh"


NOTE1: for IRAF versions >=2.14, external packages are defined and loaded in a different manner that is unclear to me. RJTOOLS tasks may be defined instead using a simple wrapper task rjtools.cl that may be placed in your IRAF home directory, and loaded by placing a line
rjtools         # Rolf Jansen's package of various IRAF scripts
before the prcache directory directive in your "login.cl" file there.

NOTE2: for the Ubuntu host OS as of version 20.04, the format of the output of the standard 'date' command differs resulting in errors thrown by any task that calls RJTOOLS task 'gdate'. The solution may be to explicitly format the output of 'date' by editing file rjtools$generic/gdate.cl, replacing the lines
!date -u > .tmpgdte
with
!date -u +"%a %b %d %T %Z %Y" > .tmpgdte
If your LOCALE settings would still result in abbreviated month names that differ from the US English default, then you may expect an error similar to:
ERROR: Attempt to access undefined local variable `uimn'.   or   ERROR: Attempt to access undefined local variable `limn'.

Package overview

Rolf Jansen's toolbox of CL scripts, v2.12 (IRAF v2.12.2). High level (interactive) routines are indicated by an asterisk.

  • RJTOOLS.GENERIC tools:
    • arg (*) replicate template script while substituting markers
    • chkimg — check (non-)existence of images/files and parse their name
    • cpadd — padd a string to the right or left with arbitrary character(s)
    • cparse — parse a string into fields using an arbitrary field delimiter
    • creverse — reverse order of characters or fields in a character string
    • gdate — parse and return the current date and time in various formats
    • icnt — loop counter tool
    • iwc — return the number of lines, words and characters as parameters
    • rdlist — read a line from a text file and return it as a parameter
    • rpbuild — construct an image region/plane specifier string
    • rpparse — parse and check an image region/plane specifier string
    • sysinfo — return host, user, directory path and IRAF version as parameters
    • vstor (*) temporary storage of command-line variables

  • RJTOOLS.IMGTOOLS tools:
    • imgstat (*) return image statistics as task parameters
    • borderstat (*) return image statistics in an image border as task parameters
    • getsky * return (sky)background level and error thereon as task parameters
    • mkmosaic * combine two images of arbitrary dimensions into a mosaic

  • RJTOOLS.TVTOOLS tools:
    • ctrcoo (*) (re)fit center positions to objects in an image
    • getregion * interactively mark rectangular regions and pixel ranges
    • imregister * register an image using objects marked in a reference image
    • markall * interactively mark objects, defects and regions in an image
    • markstds * interactively mark apertures for standard star photometry
    • tvellips * compute and/or overlay ellipses of arbitrary size and orientation
    • tvmarkall * overlay marked objects and regions on a loaded image
    • xdisplay * flexible task to display an image with sensible defaults

  • RJTOOLS.ESOHDRS tools:
    • eso2fits (*) flexible ESO hierarchical header format translator

  • RJTOOLS.ASCIITAB tools:
    • tcolarit * perform simple arithmetic on column in a text table
    • tcolstat * compute statistics for a column in a text table
    • wstat (*) compute weighted statistics from columns in a text table

  • RJTOOLS.OBSOLETE tools:
    • ocparse — (old cparse) parse a string into fields using arbitrary delimiter


Last updated: Jan 16, 2022


Back to the top of this page.
In case of problems with this page, contact: Rolf.Jansen @ asu.edu , tel.: (+1)480 727 7119