Sherpa: Goals and Design for Chandra and Beyond

We describe a new, modernized design for Sherpa, the CIAO fitting and modeling application, planned for the CIAO4.0 release. Sherpa can be used for general modeling and fitting of astronomical data. It is not restricted to analyzing X-ray spectra; Sherpa has been used to analyze images and spectra from many X-ray missions (e.g., Chandra, XMM, ROSAT), and even from optical missions such as Hubble. Sherpa provides a number of different models, fit statistics and optimization methods, and is extensible with the S–Lang programming language. However, integration with S–Lang is not complete as it was a late addition to Sherpa; and as a monolithic application, Sherpa is difficult to link to other tools and programming environments. The new design calls for separating the models, fit statistics, optimization methods and science functions into several standalone modules, that can be loaded into a new Sherpa application, other S–Lang applications, or C/C++ programs. The design will make it straightforward for users to embed Sherpa modules into other languages, such as Python or Perl. The Sherpa application will be a new S–Lang application, providing the full capabilities of S–Lang, and which will more smoothly load and run user extensions written in S–Lang, C/C++, or Fortran. Such an environment provides a flexible way for users to add functionality to solve new data analysis problems. In this paper we discuss how the new design will better support analysis of data from Chandra and many other missions (including non-X-ray missions); and how the new design will allow us to better accommodate future requirements, such as new optimization techniques, Bayesian statistics, distributed computing with Sherpa, and analysis of data sets of more than two dimensions (e.g., data cubes combining spatial and spectral information).