next up previous contents
Next: Spectral Fitting and XSPEC Up: Manual Home Page Previous: Updates to the Manual

XSPEC

            XSPEC is a command-driven, interactive, X-ray spectral-fitting program, designed to be completely detector-independent so that it can be used for any spectrometer. XSPEC has been used to analyze data from HEAO-1 A2, Einstein Observatory, EXOSAT, Ginga, ROSAT, BBXRT, ASCA, CGRO, IUE, RXTE, Chandra, XMM-Newton,  Integral/SPI, Swift and Suzaku. There now over 1000 papers listed on ADS which cite the Arnaud 1996 XSPEC reference.

            This manual describes XSPEC v12.5, which is available on Linux (gcc 3.2.2 and later), MacOSX/Darwin (gcc 3.3 and later) , Solaris (2.6-9; WS6.0 and later). New users are advised to read Chapter 2, which introduces spectral fitting and the XSPEC approach, Chapter 3, which gives an overview of the program commands, and Chapter 4, which contains walkthroughs of XSPEC sessions. They should then experiment with XSPEC and, if necessary, look up individual commands in Chapter 5, or descriptions of the spectral models in use, in Chapter 6.

            The User Interface for XSPEC, which employs a tcl scripting shell and the XSPEC parser are described in Appendix A. Users possessing X-ray spectra with small numbers of counts per bin are referred to Appendix B, which describes the C-statistic option. Users interested in adding their own models can read how to do so in Appendix C. Appendix D describes the PLT plotting package which XSPEC currently uses for graphical output. Some of the tools (FTOOLS, fortran programs, scripts) that can operate on XSPEC files are listed in Appendix E. The XSPEC model library can be linked into other programs following the instructions in Appendix F. Appendix G describes how to use your own proposal distribution for Markov Chain Monte Carlo. Finally, Appendix H includes some notes on the changes between XSPEC v11 and v12.

New in v12.7.0

            The primary new feature of 12.7.0 is the addition of the Python module, PyXspec v0.9 beta.  PyXspec is built and installed by defaulton most platforms along with the regular XSPEC build, and simply requires an "import xspec" statement to load into Python. XSPEC can now be run from object-oriented Python scripts, or interactively from a Python shell prompt. Detailed instructions can be found in  PyXspec.pdf.

            While most features of standard XSPEC are already supported in this beta release, some still remain to be implemented.  Please let us know if any missing feature is of particular importance to you, or if you have suggestions and ideas for improvement.

Other new features:

·          New models:

cplinear: Piecewise linear non-physical background model for low-count spectra developed for Chandra by Patrick Broos.

eqpair, eqtherm, compth: Paolo Coppi's hybrid hot plasma emission models.

vvapec, bvvapec: APEC models allowing all 30 elemental abundances to vary (for use with AtomDB 2.0).

zigm: Multiplicative model, computes the mean attenuation of the optical/UV spectrum by the intergalactic medium.

zashift, zmshift: Convolution models for applying redshifts to additive and multiplicative models respectively.

Also note that the default APEC model data files have been updated to AtomDB 2.0. This version of AtomDB includes contributions from more elements than earlier versions. When using the apec and vapec models these extra elements have Solar abundance by default. To change this use "xset APEC_TRACE_ABUND".

·          The 'statistic' command may now be applied to individual spectra.  This makes it possible to simultaneously fit spectra which require different fit statistics.

·          Added the 'pgstat' option to the statistic command. This is similar to using 'cstat' with a background file except that the background is assumed to have Gaussian statistics (not Poisson) read from a STAT_ERR (and optionally SYS_ERR) column.

·          Modified the pileup model for consistency with Sherpa and ISIS.  A new parameter 'fracexpo' is added which should be set to the FRACEXPO keyword value in the ARF.

·          It is now possible to choose proportional or fixed fit deltas from the startup Xspec.init file.  The initial default setting is now proportional deltas rather than fixed deltas.

·          Improvements made to the output generated during a fit.  The parameter names are listed at the top of columns, not just their numbers.  Column alignment has been improved, and is no longer limited to a maximum width of 5 columns.

·          Added reporting of the Bayesian contribution (if any) to the fit statistic output.

Enhancements previously released as patches to 12.6.0:

·          Initpackage now recognizes and builds files with .f03 extensions for Fortran 2003, and .f90 extensions for Fortran 90.

·          Added a new 'fakeit' option for setting the fake background exposure time.

·          Added a new 'tclout version' option for returning the XSPEC version string.

·          Improved XSPEC's internal update mechanism to reduce the number of model calculations.

All bug fixes to v12.6.0 released as patches a - ab are included in v12.7.0.  In addition the following problems have been corrected:

·          A crash occurred if 'tclout notice energies' was performed on a spectrum containing only a dummy response with no channels.

·          The 5 redundant 'xset' options (those which merely duplicate other existing XSPEC commands) weren't passing their arguments to the command handlers correctly.

·          Fit error messages were misleading for the case where the data was missing a suitable response, or when the only existing models were inactive.

·          A fatal error could occur in 'fakeit' when attempting to generate a background file while only a dummy was used for the response.

·          The 'bayes' command handler was not properly handling the case where the prior type option string was abbreviated.

·          A crash occurred when 'flux' was run in error mode and the specified energy was entirely outside the range of one or more spectra.

How to find out more information

XSPEC is distributed and maintained under the aegis of the GSFC High Energy Astrophysics Science Archival Research Center (HEASARC). It can be downloaded as part of HEAsoft

            http://heasarc.gsfc.nasa.gov/docs/software/lheasoft/download.html

XSPEC is available either as binaries or source. We recommend downloading the source and compiling locally to avoid potential system library conflicts and allow installation of any patches we release. If you have any problems compiling or running XSPEC please e-mail us at

xanprob@athena.gsfc.nasa.gov

The XSPEC Web page comprises links to the anonymous ftp site, a Web version of the manual, and several useful documents, including a list of known bugs. The Web address is

http://xspec.gsfc.nasa.gov/

with the list of issues and available patches at

            http://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/bugs.html

and additional models which can be added at

            http://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/newmodels.html

Further useful information can be found on the XSPEC Wiki at

            https://astrophysics.gsfc.nasa.gov/XSPECwiki/XSPECPage

and the xspector blog at

            http://xspector.blogspot.com/

History

The first version of XSPEC was written in 1983 at the Institute of Astronomy, Cambridge, under VAX/VMS by Rick Shafer. It was written to perform spectral analysis of data from the ESA EXOSAT X-ray observatory, which was launched that year. XSPEC is a descendant of a series of spectral-fitting programs written at NASA/Goddard Space Flight Center for the OSO-8, HEAO-1 and EO missions. The initial design was the fruit of many discussions between Rick Shafer and Andy Szymkowiak.  Rick Shafer subsequently joined the EXOSAT group, where he enhanced the VAX/VMS version in collaboration with Frank Haberl. Meanwhile, Keith Arnaud ported XSPEC to a Sun/UNIX operating system. The two implementations of XSPEC diverged for several years until a determined and coordinated effort was made to recover a single version. The results of that effort was XSPECv6, described in the first edition of this manual. Subsequent editions have covered later versions of the program.  In recent years XSPEC has become the de facto standard for X-ray spectroscopic analysis for the ROSAT mission and the de jure standard for the BBXRT, ASCA, and RXTE missions. It is now in extensive use for all current X-ray and gamma-ray missions. An extensive re-engineering effort was started in the fall of 1998 to improve long-term maintainability, allow significant new features to be added, and support the analysis of spectra from coded-mask instruments.

Acknowledgements 

This project would not have been possible without ignoring the advice of far more people than can be mentioned here. We would like to thank all our colleagues for their suggestions, bug reports, and (especially) source code. The GSFC X-ray astronomy group are particularly thanked for their patience exhibited while functioning as the beta test site for new releases. 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 is now funded by the HEASARC at NASA/GSFC.

References

Arnaud, K.A., 1996, Astronomical Data Analysis Software and Systems V, eds.  G. Jacoby and J. Barnes,p17, ASP Conf. Series volume 101.

Dorman, B., and Arnaud, K. A. 2001, Astronomical Data Analysis Software and Systems X eds.  F.R. Harnden, Jr., F.A. Primini, and H. E. Payne, vol. 238, p. 415

Dorman, B., Arnaud, K. A., and Gordon, C. A. XSPEC12: Object-Oriented X-Ray Data Analysis, AAS HEAD meeting No. 35, #22.10

 

next up previous contents
Next: Spectral Fitting and XSPEC Up: Manual Home Page Previous: Updates to the Manual