Next: The Application of Artificial Neural Networks to Stellar Classification
Previous: Limits to the Precision of Joint Flux and Position Measurements on Array Data
Table of Contents --- Search --- PS reprint


Astronomical Data Analysis Software and Systems V
ASP Conference Series, Vol. 101, 1996
George H. Jacoby and Jeannette Barnes, eds.

XSPEC: The First Ten Years

K. A. Arnaud1

Code 662, NASA/GSFC, Greenbelt, MD 20771

1Astronomy Department, University of Maryland, College Park MD 20742

Abstract:

It is a decade since the first paper was published containing results determined using the general X-ray spectral-fitting program XSPEC. Since then XSPEC has become the most widely used program for this purpose, being the de facto standard for the ROSAT and the de jure standard for the ASCA and XTE satellites. Probably the most important features of XSPEC are the large number of theoretical models available and the facilities for adding new models.

Motto of this work :
Getting theorists involved with data
Getting observers involved with theory

1. Introduction

X-ray spectroscopy of extra-solar astronomical sources suffers from an extreme scarcity of photons. Except for a very small number of the brightest sources it is essential to use non-dispersive spectroscopic methods because the low efficiency of dispersive methods buries the signal in the noise. However, non-dispersive X-ray spectroscopy has low resolution (< 100) so conventional analysis methods using line diagnostics, as practiced with optical and UV data, are not practical. In addition, in the X-ray waveband the continuum shape contains important physical information.

 
Figure 1: An illustration of the line blending seen using current technology spectrometers.
Figure 1: PS 204 Kb

These problems are illustrated in Figure 1 which shows a theoretical spectrum of an X-ray emitting plasma at a temperature of K and the spectrum that would be observed using the highest resolution non-dispersive X-ray spectrometer available at present (the ASCA SIS). The observed spectrum shows both the blending together of the theoretical lines and the effects of the change with energy of the detector efficiency. To extract interesting astrophysics from this spectrum requires both a measurement of the underlying continuum shape and of the line strengths.

The standard solution to these problems is to use a fitting scheme where a theoretical model is calculated, convolved with the instrumental response, and compared to the observed data using some statistic (usually ). The theoretical model is varied until a ``good fit'' to the observed data is found. Usually, the variation in the theoretical model is expressed through changes in a small number of parameters (e.g., the temperature of a black-body). Figure 2 illustrates this process.

2. The XSPEC Program

The technique of analysis described above has been used in X-ray astronomy since the late '60s (e.g., Gorenstein, Giacconi, & Gursky 1967) but usually with software that was created specifically for the experiment whose data was being analyzed. In 1983 Rick Shafer decided to write a general-purpose interactive spectral fitting program which would be entirely instrument-independent. Although XSPEC was written to analyze data from the EXOSAT Observatory, a primary design goal was that it could also be used for other instruments. The EXOSAT observatory carried four separate instruments, operating concurrently, so XSPEC was written with the capability to analyze multiple datasets simultaneously.

All XSPEC requires to work on data from a new instrument is that the spectra and the detector response be stored in standard format FITS files (Arnaud, George, & Tennant 1992; George, Arnaud, & Ruamsuwan 1992). The detector response is a 2-D matrix where one axis is input X-ray energy and the other is observed spectrometer channel.

Over the last decade, during which time the author took over primary responsibility for support and development, XSPEC has become the world-standard for astronomical X-ray spectroscopy, being in use in more than fifteen countries. XSPEC has been used to analyze data from every major X-ray astronomy mission since EXOSAT in addition to many older datasets. One much used feature of XSPEC is its ability to generate simulated spectra given a theoretical model and a detector response. This facility has come to play an important part in guest observer proposals to NASA for the ROSAT, ASCA, and XTE missions.

In addition to its use in X-ray astronomy XSPEC has also been used on spectra in the -ray, EUV, UV, and optical wavebands. XSPEC is particularly well suited for testing multiwavelength models of sources (e.g., AGN from X-ray to high-energy -ray or stellar coronae from the EUV to the hard X-ray).

XSPEC is written mainly in Fortran and is available for Sun (SunOS and Solaris), DEC (OSF, Ultrix, and VMS), and SGI. HP and IBM/AIX versions are currently being built and tested. All XSPEC graphics use the PLT interface (Tennant 1991) to the PGPLOT package (Pearson 1995).

 
Figure 2: The process of fitting theoretical models to X-ray spectra.
Figure 2: PS 40 Kb

3. Theoretical Models in XSPEC

An important feature of XSPEC is the wide range of theoretical models available. There are more than 50 built-in theoretical models, ranging from the simple (e.g., power-laws) to the complex (e.g., thermal plasmas or comptonized emission).

New theoretical models can be added to XSPEC through two different schemes. Firstly, they can be calculated through a simple (Fortran) subroutine interface where the input is the energy bins and the model parameter values with the output being the fluxes for the input energy bins. Adding a new model by this means involves writing the subroutine and re-linking XSPEC. A second method which involves no rebuilding of XSPEC is by table model files. The table model file contains an N-dimensional grid of spectra, where N is the number of model parameters, along with all the descriptive information about the model that XSPEC requires. These files provide a simple way for users to compare any model that they can generate with a given dataset.

4. The Future

In addition to the continuing individual enhancements there are several larger projects in progress. For the last couple of years the XSPEC source code has been migrated to a more object-oriented approach. This paid off almost immediately in simplification of the source code and ease of addition of new features. The eventual aim is to create an XSPEC class library so that XSPEC features can be used in other programs. A longer term aim in XSPEC development is to introduce a new front-end with GUI capability. One possibility for this is to build it using Tcl/Tk. In terms of internal algorithms the main change in future will be an increasing emphasis on global minimization methods to find the best fit model to the data. Finally, the author hopes to continue building links with X-ray astronomy software developers around the world. An important aspect of this is a collaboration that is just starting with the AXAF Science Center to coordinate development of fitting programs.

5. Useful addresses and documentation

Questions, comments, and bug reports about XSPEC should be sent to xanprob@athena.gsfc.nasa.gov. A complete set of documentation for XSPEC can be found on the WWW at the URL : http://legacy.gsfc.nasa.gov/docs/xanadu/xspec/u_manual.html.

Acknowledgments:

Major contributions to the development of XSPEC were made by Rick Shafer, Frank Haberl, and Allyn Tennant. Many others have contributed code, spotted bugs, and made helpful suggestions. The initial development of XSPEC was funded by a Royal Society grant to Prof. Andy Fabian and subsequent development was partially funded by the European Space Agency's EXOSAT project and now by the NASA/GSFC HEASARC.

References:

Arnaud, K. A., George, I. M., & Tennant, A. F. 1992, Legacy, 2, 65

George, I. M., Arnaud, K. A., & Ruamsuwan, L. 1992, Legacy, 2, 51

Gorenstein, P., Giacconi, R., & Gursky, H. 1967, ApJ, 150, L85

Pearson, T. J. 1995, PGPLOT Graphics Subroutine Library, California Institute of Technology

Tennant, A. F. 1991, The QDP/PLT User's Guide, NASA Technical Memorandum 4301


Next: The Application of Artificial Neural Networks to Stellar Classification
Previous: Limits to the Precision of Joint Flux and Position Measurements on Array Data
Table of Contents --- Search --- PS reprint
Wed Jul 3 07:27:46 MST 1996