A Production System for Radial Velocity Measurements
By Douglas J. Mink and William F. Wyatt
Harvard-Smithsonian Center for Astrophysics, Cambridge, MA 02138
A system has been developed at the Center for Astrophysics to mass-produce
and archive radial velocity measurements. One-dimensional spectra arriving
as FITS files are reduced and stored in an extensible archive format which
contains complete information about the reduction process. In order to keep
over 150,000 reduced spectra on-line for analysis, the format combines
information compactly in variable-length ASCII and binary records. Each
spectrum in the archive occupies one file which, for each instrument, has
a unique identifying number. A collection of stand-alone Fortran programs
allow examination of the archived spectra, translation to a portable format,
and co-addition of spectra, and several other functions. A library of
Fortran-callable access subroutines allows scientists to use the archive
with their own programs. IRAF tasks to import and analyze archived
spectra have been integrated with the Fortran and C programs to take
advantage of IRAF's data analysis and display capabilities.
At the Center for Astrophysics, over 150,000 spectra have been collected
at telescopes in Massachusetts and Arizona to be used to compute radial
velocities of stars and galaxies. In the past, spectra were
reduced using a software system written in Forth on Data General Nova
computers (Tonry and Davis 1979, Tonry and Wyatt 1988). The results were
then archived in a compact binary format on one of a roomful of removable
disks. To examine one spectrum, its disk had to be retrieved and mounted
on the computer. Generating reports directly from the archive could
require much disk changing.
As the Novas began to wear out, a decision was made to replace them with
a hardware-independent archive and a portable data reduction and analysis
system. The hardware selection was simple--a Unix system with lots of disk
space. Reduction and database software could then be written in Fortran
or C, and the archive could be made accessible across the local network
via the Network File System for processing or analysis on other computers.
The radial velocity analysis software, however, was written in the IRAF
environment (Tody 1986) so that it could be used on a range of data beyond
that taken on Smithonian Astrophysical Observatory telescopes.
The new archive had to meet the several criteria. As the archive
would have to hold all present and future spectra in a reasonable amount
of disk space, the format had to be as compact as possible. This precluded
the standard FITS format. The storage format would have to contain all of
the information about the spectra in the Nova archive format. It should be
easy to change any information about any spectrum or add new information
about any spectrum. Lastly, the format should be machine-independent, so
it may be easily accessed from several types of computer.
An archive format was designed with one file per spectrum, organized into
a Unix directory tree by instrument, telescope, and sequence number. Each
file is made up of multiple variable-length records which may be ASCII,
integer, IEEE floating-point, or some combination of the three in network
(big-endian) byte order. Each record within a file has a 48-byte ASCII
header beginning with a record name and length in bytes. Programs which
access the archive can skip over records they don't need or recognize, but
must know the format of the records they are using.
An assortment of reporting software was developed to display the contents
of the archive. ZPRINT prints the contents of a single archive file in
a variety of formats.
PSPEC plots the spectrum in one file in wavelength or pixel space.
ARCHEDIT allows editing of existing archive files, performing consistency
checks to avoid damage. SUMSPEC co-adds spectra, with appropriate
wavelength shifts, to improve signal-to-noise.
The pre-existing Nova reduced data files were converted to this format to
keep the entire available on line. The current archive has about 150,000
spectra totaling 1.5 Gbytes of disk storage.
Initial reduction is done under the Unix operating system using standalone
C and Fortran routines which duplicate the actions taken by SAO's time-proven
Nova software. The primary task of the reduction is to create a normalized
(via flat-field incandescent) object spectrum and to compute the wavelength
dispersion polynomial used in later analysis. In general the latter
computation can be easily automated by using an earlier polynomial as the
starting point and figuring shifts from it.
In addition, enough information is stored to permit the exact re-reduction
of the data should that be necessary. All control parameters, including
names of raw data files, are stored in a file known as the `skeleton'. This
file is later copied into the archive file as one of its records. Since most
of the parameters rarely change, they are stored on a `template parameter
file' to which each skeleton points. These files are saved forever; when a
change is needed, a new version becomes current, but the old one remains as
the record of past reductions.
The variable part of the skeleton is unique to each spectrum, but a system
script helps the data aide create the entire series of skeleton files for
each night's and each lunation's data. Barring data difficulties, the
initial reduction of several hundred objects from a week or so of observing
takes only a few hours.
ARCHIVE, an IRAF package, is centered on RARC, a task which converts archive
files to IRAF files using the dispersion correction calculated outside of IRAF.
IRAF Command Language scripts and supporting SPP tasks in the ARCHIVE package
allow access to groups of reduced archive files from within IRAF by their
instrument and sequence numbers, so users do not need to know the full file
names. Radial velocities are computed using the XCSAO task in the RVSAO
package (Kurtz, et al 1992), which cross-correlates the spectra against a
set of templates, and ESPEC, which fits the emission lines in a spectrum.
ESPEC, a Fortran program which works directly on the archived spectra,
is declared to be a foreign IRAF task so it can be run in CL scripts with
XCSAO. An IRAF SPP version, EMSAO, is currently in the testing stage.
The results from the radial velocity computations, with enough supporting
information to rerun them under identical conditions, are appended to the
archive files. Summaries of the results are obtained using the standalone
program RSPEC which tabulates radial velocities and other identifying
information for a list or file of archive files.
The archive is currently being extended to include more than the five original
instruments. Modifications are being made to accept data reduced entirely
or partially inside the IRAF environment, and new IRAF tasks are being written
to automate the transfer of multi-fiber spectroscopic data to file-per-spectrum
Robert Davis, John Huchra, David Latham, and Susan Tokarz helped define
the data archive format and debug the software.
Kurtz, M.J., Mink, D.J., Wyatt, W.F., Fabricant, D.G., Torres, G.,
Kriss, G.A., Tonry, J.L. 1992, in Proceedings of the First Conference on
Astronomical Software and Systems, ed. Worrall, D., Biemesderfer, C.,
Tonry, J.L. and Davis, M. 1979, Astronomical Journal, 84, 1511
Tonry, J.L. and Wyatt, W.L. 1988, CFA Z-Machine Data Analysis
Software, Cambridge: Smithsonian Astrophysical Observatory
Tody, D. 1986, in Instrumentation in Astronomy VI, ed. D.L.
Crawford, Proc. SPIE 627, 733.