SPECX is a general purpose program, originally written on the NORD 10/50 of the Mullard Radio Astronomy Observatory, and substantially updated on the VAX 11/780 of the Department of Astronomy at the University of California, Berkeley. It operates on spectral-line data stored in random access binary files of arbitrary length. The format of these files is described in detail in Appendix F. SPECX is sufficiently flexible that data from most instruments can be handled by the program, and has been used to reduce data from the mm and sub-mm spectral-line receivers at UKIRT and JCMT, from the 14-m dish of the FCRAO, from Onsala and from the 11-metre and 300-foot telescopes of the NRAO.
SPECX makes use of either the MONGO graphics package FORTRAN subroutine library, or of the PGPLOT library. These packages includes interactive graphics via the cursor on VT100/Retrographics and other Tektronix-emulation terminals, and in the case of PGPLOT graphics, with X-terminals also. If the terminal type will permit, as much reduction as possible is performed in interactive graphics mode.
One of the main reasons for writing the program originally was to reduce data from the autocorrelation spectrometer at UKIRT, and more recently from the DAS at JCMT. Facilities are included for processing up to eight ``parallel" spectra (``sectors", ``quadrants" or ``sub-bands"), which may have the same or different centre frequencies, resolutions, etc. This feature allows it to process the eight correlator channels, different filter-banks, dual polarization data, etc.
SPECX is user-friendly1.1. All input required by the program is prompted for if not specified in the command line, so that it is not necessary to remember hundreds of arcane keywords. The individual commands are given informative names, so that the appropriate command can nearly always be found quickly by intelligent use of the HELP or SHOW-COMMANDS commands. The command line interpreter recognizes acceptable abbreviations for all commands, accepts parameters in free-format, and will accept a number of commands on one line. The SPECX command language is described in detail in Chapter 3 of this document. It is not necessary to know more than the bare minimum about the command language in order to use SPECX fruitfully, but in fact it is not particularly complicated.
A facility is included for writing the current reduction environment to a dump (.DMP) file. This may be set to dump automatically, after each SPECX command or macro, or only when specifically requested. This facility allows you to recover from a crash, or return after a coffee-break or whatever and find all flags, variables and spectra in the same state as when you left. It is also possible to tailor different incarnations of the program for different purposes, such as reducing FCRAO data with one and JCMT data with another.
Several different classes of facility are available in SPECX. These include:
Please note that SPECX is primarily a tool for manipulating single spectra. It is anticipated that once a map file has been produced that another program will be used to reduce this map (although SPECX has an excellent set of tools for display of the map data). As a result, SPECX does not include facilities for performing reduction operations on the map, although any individual spectrum can be retrieved, manipulated and replaced in the map. The plane of the map being contoured is held in a temporary storage file MAPPLANE.TMP, and the last version is not deleted after use. This is a simple binary file, with record length equal to the number of points in a row, which can be read or mapped to an array in another program or read directly by the IMAGE command in Berkeley/MRAO MONGO. I have recently also managed to read MAPPLANE.TMP directly into the image-processing program VIEW (from Lawrence Livermore Laboratory), running under Unix on a Sun (VIEW has a command which converts DEC reals to IEEE reals, including the necessary byte-swapping).