XSPEC, Fitting, and Atomic Data Keith Arnaud July 13th 2012 Leicester XSPEC XSPEC is an interactive program widely used to fit parameterized models to energy spectra, primarily in the X-ray and gamma-ray bands. It has been used for over 6000 refereed papers. XSPEC includes a library of over 150 physical models. This library is available independently for use by other programs. An individual researcher can easily add their own models. This can be done within an XSPEC run by loading an external subroutine, or reading a FITS file containing a grid of theoretical spectra. July 13th 2012 Leicester Current status Latest version is XSPEC v12.7.1d. V12.7.1 was released as part of HEAsoft 6.12 which also included PyXspec v1.0, our XSPEC Python module. HEAsoft 6.12 also included HEASP 1.0, a new C++/C/Python library for manipulating spectra, responses, table model files. I recently had to overhaul WebSpec for security reasons and took the opportunity to add the ability to make confidence contours. July 13th 2012 Leicester Craig Gordon July 13th 2012 Leicester Bryan Irby Equilibrium ionization collisional models apec mekal raymond based on AtomDB an older version of SPEX the original raymond-smith A number of models build on these with multiple temperature components including power-law, gaussian, and Chebyshev polynomial differential emission distributions as well as physicallymotivated examples such as cooling flows. All these models run through a single routine so it is easy to build new multi-temperature models. Almost all these models can also be run using alternative atomic physics data provided they are presented through apec coco and line FITS files. July 13th 2012 Leicester Non-equilibrium ionization collisional models These models from Kazik Borkowski range from the simple, a single temperature and an ionization parameter, to plane parallel shocks and Sedov models. There is an option to use AtomDB to calculate the spectra though the current version does not include many of the lines produced by out of equilibrium plasma. Further, the ionization fractions are based on pre-AtomDB data so also need to be updated. July 13th 2012 Leicester Photoionized plasmas Photoionized plasma codes are generally too CPU intensive to run inside XSPEC so instead they are run externally to generate grids of models which can be stored in table model FITS files and used in fitting. Both XSTAR and CLOUDY have been used in this way. XSPEC also includes models for ionized absorbers and Compton “reflection”. Some of these models use older atomic physics data however getting the physical model correct may be a larger source of uncertainty. July 13th 2012 Leicester Some useful XSPEC commands addline – adds a gaussian or lorentzian line at the position of largest residual between current model and data identify – list possible lines in a given energy range. Uses either the Bearden compilation of fluourescence lines, the mekal line list or the apec line list. If the latter then can also specify a temperature plasma and a minimum emissivity. modid – runs identify on all the gaussian lines in the current model. setplot id – add line IDs to plots. Uses the apec line list for a given temperature and minimum emissivity. Leicester A few things I’m working on / worrying about. Models Statistics Computational issues User support Multi-wavelength support July 13th 2012 Leicester Models Rationalized the models involving Compton reflection – sharing the code. Trying to sort out eqpair. Need an XMM pileup model - Prashin Jethwa What else ? July 13th 2012 Leicester Statistics Separate statistics for parameter estimation and goodness-of-fit. More goodness-of-fit options. Poisson data with background. More support for Bayesian methods - priors. July 13th 2012 Leicester Computational Issues Parallelization of parts of code. - starting on derivatives wrt parameters Improvement to Levenberg-Marquardt (standard fit algorithm). Better error algorithm. - parallel ? Use Goodman-Weare version of MCMC (emcee). Computing in cloud. July 13th 2012 Leicester July 13th 2012 Leicester Spitzer IRS spectrum of NGC 4395 Riley et al., 2012 July 13th 2012 Leicester July 13th 2012 Leicester Multi-wavelength support Allow spectra, responses and table models in other units. Convert when reading into xspec. Allow models written in other units. Specify units in the model.dat entry. Build up model libraries for other wavebands. Spitzer IRS, SDSS, ??? July 13th 2012 Leicester