Chandra X-Ray Observatory
Skip to the navigation links
Last modified: 1 February 2017


Latest Updates

This document highlights important changes and additions to Sherpa functionality in the CIAO 4.9 Sherpa release.

Latest Version

Sherpa version for CIAO 4.9 was released on December 16, 2016. Sherpa now runs under Python 2.7 and Python 3.5. The major updates are: the update of the XSPEC models to version 12.9.0d; the addition of the wstat statistic, for including a background dataset as a model component (it is based on the XSPEC version); support for background data sets in user statistics created with load_user_stat; a major upgrade to the Python docstrings (the ahelp pages are still available in this release); and it is the first CIAO release based on the GitHub-developed version of Sherpa. Please consider contributing to Sherpa development, whether by adding code, fixing bugs, or changing documentation.

CIAO 4.9 Updates to Sherpa Functionality

XSPEC Models

The XSPEC model library has been updated to version 12.9.0d from 12.8.2e used in CIAO 4.7. The nlapec model is not included, but it can be emulated by taking advantage of the new APECNOLINES xset setting:

sherpa> set_source( * xsapec.src)
sherpa> set_xsxset('APECNOLINES', 'on')

The parameter names have not been updated to match the changes made by XSPEC.


A new statistic has been added to Sherpa: wstat (based on the XSPEC version) which extends the cstat statistic to include a Poisson background component.

sherpa> load_data('src.pi')
read ARF file src.arf
read RMF file src.rmf
read ARF (background) file src_bkg.arf
read RMF (background) file src_bkg.rmf
read background file src_bkg.pi
sherpa> set_source( *
sherpa> set_stat('wstat')
sherpa> set_method('simplex')
sherpa> notice(0.5, 7)
sherpa> fit()

User statistics - created with the load_user_stat command - now have access to the background component of a data set.


The top-level functions - namely those in the sherpa.astro.ui and sherpa.ui modules - have had their Python docstrings updated to reflect the current state of the ahelp files and to follow the NumPy docstring convention. These Python docstrings are now available from the Sherpa application via the help function (previously the text was replaced by a comment to use the ahelp function). The ahelp files are still provided in this release.

If you spot any errors, or missing information, in the docstrings, please submit a pull request to fix it or report the problem.


The location of the IPython configuration files used by both the Sherpa and ChIPS command-line applications has changed from $HOME/.ipython-ciao4.5/ to $HOME/.ipython-ciao/. Any customizations made to these files will need to be manually copied over.

If you have used CIAO 4.0 to 4.4 then you may have old files in this location, which will cause Sherpa and ChIPS to display a warning message the first time they are started:

unix% sherpa

 ATTENTION: The old IPython files found in /home/user/.ipython-ciao are not compatible with 
 this version of sherpa. They have been moved to /home/user/.ipython-ciao/old_ipython.

Welcome to Sherpa: CXC's Modeling and Fitting Package
CIAO 4.8 Sherpa version 1 Thursday, December 3, 2015

Bug Fixes

A full list of the bug fixes can be found on the CIAO 4.8 release notes page, or by viewing the changes made to the 4.8.0 release branch on GitHub.

Last modified: 1 February 2017
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.