Skip to main content

Modeling and fitting package for scientific data analysis

Project description

Build Status Documentation Status DOI GPLv3+ License Python version

Table of Contents

Sherpa

Sherpa is a modeling and fitting application for Python. It contains a powerful language for combining simple models into complex expressions that can be fit to the data using a variety of statistics and optimization methods. It is easily extensible to include user models, statistics, and optimization methods. It provides a high-level User Interface for interactive data-analysis work, such as within a Jupyter notebook, and it can also be used as a library component, providing fitting and modeling capabilities to an application.

What can you do with Sherpa?

  • fit 1D (multiple) data including: spectra, surface brightness profiles, light curves, general ASCII arrays
  • fit 2D images/surfaces in Poisson/Gaussian regime
  • build complex model expressions
  • import and use your own models
  • use appropriate statistics for modeling Poisson or Gaussian data
  • import new statistics, with priors if required by analysis
  • visualize the parameter space with simulations or using 1D/2D cuts of the parameter space
  • calculate confidence levels on the best fit model parameters
  • choose a robust optimization method for the fit: Levenberg-Marquardt, Nelder-Mead Simplex or Monte Carlo/Differential Evolution.

Documentation for Sherpa is available at Read The Docs and also for Sherpa in CIAO.

A Quick Start Tutorial is included in the notebooks folder and can be opened with an ipython notebook.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. A copy of the GNU General Public License can be found in the LICENSE file provided with the source code, or from the Free Software Foundation.

How To Install Sherpa

Full installation instructions are part of the Read The Docs documentation, and should be read if the following is not sufficient.

It is strongly recommended that some form of virtual environment is used with Sherpa.

Sherpa is tested against Python versions 3.5, 3.6, and 3.7. It is expected that it will work with Python 3.8 but testing has been limited.

The last version of Sherpa which supported Python 2.7 is Sherpa 4.11.1.

Using Anaconda

Sherpa is provided for both Linux and macOS operating systems running Python 3.5, 3.6, and 3.7. It can be installed with the conda package manager by saying

$ conda install -c sherpa sherpa

Using pip

Sherpa is also available on PyPI and so can be installed with the following command (which requires that the NumPy package is already installed).

% pip install sherpa

Building from source

Source installation is available for platforms incompatible with the binary builds, or for when the default build options are not sufficient (such as including support for the XSPEC model library). The steps are described in the building from source documentation.

History

Sherpa is developed by the Chandra X-ray Observatory to provide fitting and modelling capabilities to the CIAO analysis package. It has been released onto GitHub for users to extend (whether to other areas of Astronomy or in other domains).

Release History

4.12.0: 30 January 2020 DOI

4.11.1: 1 August 2019 DOI

4.11.0: 20 February 2019 DOI

4.10.2: 14 December 2018 DOI

4.10.1: 16 October 2018 DOI

4.10.0: 11 May 2018 DOI

4.9.1: 01 August 2017 DOI

4.9.0: 27 January 2017 DOI

4.8.2: 23 September 2016 DOI

4.8.1: 15 April 2016 DOI

4.8.0: 27 January 2016 DOI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sherpa-4.12.1.tar.gz (11.5 MB view details)

Uploaded Source

File details

Details for the file sherpa-4.12.1.tar.gz.

File metadata

  • Download URL: sherpa-4.12.1.tar.gz
  • Upload date:
  • Size: 11.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.24.0 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.5.6

File hashes

Hashes for sherpa-4.12.1.tar.gz
Algorithm Hash digest
SHA256 691516e355b3f9e8b1c29980a368ebd46729ab4aeb0ded6e6b967def55dd6db7
MD5 2e886f781d7371ddf105cd4f14caa673
BLAKE2b-256 455021beff474d1c555c62a488422930b0c3d88eebc8129b4d9b9a05b1dd088c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page