Latest Updates
This document highlights important changes and additions to Sherpa functionality in the CIAO 4.18 Sherpa release.
Sherpa version for CIAO 4.18 was released on December 16, 2025. Sherpa in CIAO runs under Python 3.12, whether installed using ciao_install, ciao, or as a macOS DMG image. The full list of the Sherpa updates compared to 4.17 is given in the 4.18.0 and 4.17.1 release notes on GitHub. This release incorporates many bug fixes. The major updates include added support for using SciPy optimizers, a new CStat statistics to deal with model predicted negative counts, simultaneous plotting of multiple data sets and a new interface to ArviZ python package for exploratory analysis of Bayesian models.
The release highlights include:
- New Fitting and Modeling Features
-
New optimization options: Sherpa now supports optimizers from SciPy and optimagic, giving users more flexibility when fitting complex models.
Improved cstat handling: A new statistic variant cstatnegativepenalty better manages cases where the model predicts negative values.
Plot multiple datasets at once: Users can now visualize several datasets in a single command, simplifying multi-dataset workflows.
- Enhancements
-
Better Access to Fitting Information: You can now easily retrieve all parameter values tried during a fit, making debugging and model exploration easier, by using the record_steps option of fit.
Arbitrary NumPy functions can now combine models and allows constructs like np.log10(const1d.mdl) and np.greater(model1, model2).
Plotting Improvements: Backend-specific options are now correctly passed to Matplotlib and Bokeh. Plotting functions now accept lists for arguments, making them consistent across different plotting modes.
Usability Improvements: Sherpa 4.18 introduces new convenience methods for creating imaging datasets, making it easier to work with 2D arrays - particularly when you want to quickly turn an image (e.g., NumPy array) into a Sherpa DataIMG or DataIMGInt dataset.
Documentation has been updated across multiple areas, including statistics, parallel processing, and plotting.
Documentation
Help can be found either via Python's native help function (that is, Python docstrings), or with the ahelp command (which can be used from both the command line and within the Sherpa interactive environment.
If you spot any errors, or missing information, please submit a pull request to fix it or report the problem.
A standalone the Sherpa documentation provides on-line access to the Python docstrings, as well as general documentation on how to use Sherpa. It is aimed at users who want to use the more object-orientated interface provided by Sherpa rather than the functions from the sherpa.astro.ui module documented on this site, as well as not being tailored to CIAO users, but it is useful for the more advanced Sherpa users who want to use Sherpa in complex Python pipelines.
Bug Fixes
Sherpa 4.18 includes numerous fixes that improve stability and correctness.
Highlights include fixes to Fitting and Sampling: Covariance matrices are now always recalculated when needed. Sampling routines (normal, t, uniform) now use the correct random generator, respect parameter linking. Clip values to model limits and indicate when clipping occurs.
A full list of the bug fixes can be found by viewing the changes made to the 4.18.0 and 4.17.1 release branches on GitHub.