CINXE.COM

Sherpa: CIAO's Modeling & Fitting Application - CIAO 4.17 Sherpa

<!DOCTYPE html> <html lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Sherpa: CIAO's Modeling &amp; Fitting Application - CIAO 4.17 Sherpa</title> <meta name="keywords" content="Sherpa, CIAO, x-ray, fit, model, fitting, modeling, spectra, spectrum, images, image, analysis, reduction, astronomy, astrophysics, chandra, axaf"> <meta name="description" content="Sherpa is CIAO's modeling and fitting application"> <link rel="stylesheet" title="Default stylesheet for CIAO-related pages" href="/ciao4.17/ciao.css"> <link rel="stylesheet" title="Default stylesheet for CIAO-related pages" media="print" href="/ciao4.17/ciao.print.css"> <link rel="canonical" href="https://cxc.cfa.harvard.edu/sherpa/"> <style> h1#tagline { margin: 0; } .subtitle { font-size: smaller; } div.maincontents { display: flex; column-gap: 0.5em; } div.maincontents div { flex: auto; } div.images { align-items: center; display: flex; flex-direction: column; } .bibitem { background: rgba(204, 204, 204, 0.4); padding: 0.5em; } </style> <link rel="icon" href="/ciao4.17/favicon.ico"> <meta name="title" content="Sherpa: CIAO's Modeling &amp; Fitting Application - CIAO 4.17 Sherpa"> <meta name="creator" content="SAO-HEA"> <meta name="date" content="2024-12-11"> <meta name="subject" content="The Sherpa package for fitting and modeling data (part of CIAO)."> <meta name="keywords" content="SI,Smithsonian,Smithsonian Institute"> <meta name="keywords" content="CfA,SAO,Harvard-Smithsonian,Center for Astrophysics"> <meta name="keywords" content="HEA,HEAD,High Energy Astrophysics Division"> <style>html { display: none; }</style> <script> if (self == top) { document.documentElement.style.display = 'block'; } else { top.location = self.location; } </script> </head> <body class="withnavbar"> <!-- THIS FILE IS CREATED AUTOMATICALLY - DO NOT EDIT MANUALLY --> <!-- SEE: /data/da/Docs/sherpaweb/ciao417/index.xml --> <header><nav> <!-- START OF SmartSource Data Collector TAG --> <!-- Copyright (c) 1996-2013 Webtrends Inc. All rights reserved. --> <!-- Version: 9.4.0 --> <!-- Tag Builder Version: 4.1 --> <!-- Created: 5/31/2013 5:43:55 PM --> <script src="/scripts/webtrends.js" type="text/javascript"></script> <!-- ----------------------------------------------------------------------------------- --> <!-- Warning: The two script blocks below must remain inline. Moving them to an external --> <!-- JavaScript include file can cause serious problems with cross-domain tracking. --> <!-- ----------------------------------------------------------------------------------- --> <script type="text/javascript"> //<![CDATA[ var _tag=new WebTrends(); _tag.dcsGetId(); //]]> </script> <script type="text/javascript"> //<![CDATA[ _tag.dcsCustom=function(){ // Add custom parameters here. //_tag.DCSext.param_name=param_value; } _tag.dcsCollect(); //]]> </script> <noscript> <div><img alt="DCSIMG" id="DCSIMG" width="1" height="1" src="//logs1.smithsonian.museum/dcscdsyh8bdzpxna72mrneyep_4s6j/njs.gif?dcsuri=/nojavascript&amp;WT.js=No&amp;WT.tv=9.4.0&amp;dcssip=www.cxc.cfa.harvard.edu"/></div> </noscript> <!-- END OF SmartSource Data Collector TAG --> <div id="cxcheader"> <div id="cxcheaderleft"> <a href="/index.html"> <img style="min-width: 100%" id="spacecraft" src="/incl/withoutrays.png" alt="Chandra X-Ray Observatory (CXC)"></a> </div> <div id="cxcheaderright"> <ul> <li><a href="/ciao/">Data Analysis</a></li> <li><a href="/cda/">Archive</a></li> <li><a href="/proposer/">Proposer</a></li> <li><a href="/index.html">CXC Home</a></li> </ul> <ul> <li><a href="https://chandra.harvard.edu/">For the Public</a></li> <li><a href="/cal/">Instruments & Calibration</a></li> </ul> </div> </div> </nav><div class="hideme"><a href="#navtext" accesskey="s" title="Skip to the navigation links">Skip to the navigation links</a></div> <div class="topbarcontainer withnavbar"> <div class="topbar"> <div class="searchbar"> <script> (function() { var cx = '010635440115680569175:b4560pu3n5g'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); </script> <span class="searchbar"> Search https://cxc.harvard.edu/sherpa/ </span> <gcse:searchbox-only></gcse:searchbox-only> <span class="searchbar"> <a href="/helpdesk">Contact the CXC HelpDesk</a> </span> </div> </div> <div class="topbar"> <div class="lastmodbar">Last modified: 11 December 2024</div> <br class="hideme"><div class="urlbar">URL: https://cxc.cfa.harvard.edu/sherpa/index.html</div> </div> </div></header><main id="content"><div class="wrap"> <div class="pagetitle"> <img id="logo" src="imgs/sherpa_logo.gif" alt="[Sherpa logo]"> <h1 id="tagline"><em>CIAO's modeling and fitting package</em></h1> </div> <div class="noprint"> <div class="noprint" style="text-align: center"> <span class="pheader"><a title="What's new for Sherpa &amp; users of Sherpa" href="/sherpa/news.html">WHAT'S NEW</a> | <a title="Items to be aware of when using Sherpa" href="/sherpa/watchout.html">WATCH OUT</a></span><br> </div> <div class="pagetitle subtitle"> <a href="threads/index.html">Analysis Threads</a> | <a class="helplink" title="Ahelp index (Sherpa)" href="ahelp/index_context.html">Ahelp</a> | <a href="/ciao/download/index.html">Download CIAO</a> || <a href="/ciao/index.html">CIAO</a> | <a href="/ciao/psf_central.html">PSF Central</a> </div> </div> <hr> <p> Sherpa is the CIAO modeling and fitting application. It enables the user to construct complex models from simple definitions and fit those models to data, using a variety of statistics and optimization methods (see the <a href="gallery">Gallery of Examples</a>). </p> <div class="admonition"> <div class="title"><span class="title">CIAO 4.17</span></div> <p> <em>Sherpa</em> version for CIAO 4.17 was released on December 17, 2024. <em>Sherpa</em> in CIAO runs under Python 3.11 (whether installed using the <a title="FAQ: What is the conda package manager?" href="/ciao/faq/conda.html"><span class="tt">conda</span> package manager</a> or with <span class="tt"><a class="helplink" title="Ahelp (concept): Download and install CIAO, CALDB, MARX, and the contributed script files" href="/ciao/ahelp/ciao-install.html">ciao-install</a></span>). The full list of the <em>Sherpa</em> updates compared to 4.16.0 is given in the <a href="https://github.com/sherpa/sherpa/releases/tag/4.17.0">4.17.0</a> and <a href="https://github.com/sherpa/sherpa/releases/tag/4.16.1">4.16.1</a> release notes on GitHub. The major updates were made to plotting, adding the 50 new models in XSPEC 12.14.0, improvements to including linked parameters in fits and the guess routine, fixes for support for 1D data with asymmetric errors, updates for the <em>experimental</em> bokeh plotting backend, and bug fixes. </p> <p> More information on this release can be found on the <a href="updates.html">Sherpa updates</a> page. </p> </div> <div class="maincontents"> <div> <strong><em>Sherpa lets you:</em></strong> <ul> <li><p><em>fit 1-D data sets (simultaneously or individually), including: <br>spectra, surface brightness profiles, light curves, general ASCII arrays;</em></p></li> <li><p><em>fit 2-D images/surfaces in the Poisson/Gaussian regime;</em></p></li> <li><p><em>visualize the data with Matplotlib and DS9;</em></p></li> <li><p><em>access the internal data arrays;</em></p></li> <li><p><em>build complex model expressions;</em></p></li> <li><p><em>import and use your own models;</em></p></li> <li><p><em>choose appropriate statistics for modeling Poisson or Gaussian data;</em></p></li> <li><p><em>import new statistics, with priors if required by analysis;</em></p></li> <li><p><em>visualize a parameter space with simulations or using 1-D/2-D cuts of<br> the parameter space;</em></p></li> <li><p><em> calculate confidence levels on the best-fit model parameters;</em></p></li> <li><p><em> choose a robust optimization method for the fit: Levenberg-Marquardt,<br> Nelder-Mead Simplex or Monte Carlo/Differential Evolution;</em></p></li> <li><p><em> perform Bayesian analysis with Poisson Likelihood and priors, using<br> Metropolis or Metropolis-Hastings algorithm in the MCMC (Markov-Chain Monte Carlo); </em></p></li> <li><p><em>and use Python to create complex analysis and modeling functions, <br>build the batch mode analysis or extend the provided functionality <br>to meet the required needs.</em></p></li> </ul> </div> <div> <div class="images"> <div id="fig_sur_bri" class="figure"><div class="thumbnail"> <div class="screenmedia"> <a href="imgs/sur_bri.png"><img alt='[Thumbnail image: Two plots, vertically aligned. The top plot, which covers about two thirds of the height, shows a radial profile of the surface brightness, along with a model fit. The bottom plot shows the residuals (in units of "sigma").]' src="imgs/sur_bri_small.png"></a><p class="figures">[Version: <a href="imgs/sur_bri.png">full-size</a>]</p> </div> <div class="printmedia"><img alt='[Print media version: Two plots, vertically aligned. The top plot, which covers about two thirds of the height, shows a radial profile of the surface brightness, along with a model fit. The bottom plot shows the residuals (in units of "sigma").]' src="imgs/sur_bri.png"></div> </div></div> <div class="clearfloat"></div> <div id="fig_image_resid" class="figure"><div class="thumbnail"> <div class="screenmedia"> <a href="imgs/image_resid.jpg"><img alt="[Thumbnail image: A DS9 image showing a two by two grid where the top-left area shows the data, the top-right the model, the bottom-left the residuals, and the bottom-right area is empty. The model is circularly symmetric and the residual image shows there's small scall differences in the code (looks like two jets) and some large scale correlated differences.]" src="imgs/image_resid_small.jpg"></a><p class="figures">[Version: <a href="imgs/image_resid.jpg">full-size</a>]</p> </div> <div class="printmedia"><img alt="[Print media version: A DS9 image showing a two by two grid where the top-left area shows the data, the top-right the model, the bottom-left the residuals, and the bottom-right area is empty. The model is circularly symmetric and the residual image shows there's small scall differences in the code (looks like two jets) and some large scale correlated differences.]" src="imgs/image_resid.jpg"></div> </div></div> <div class="clearfloat"></div> <div id="fig_reg_proj" class="figure"><div class="thumbnail"> <div class="screenmedia"> <a href="imgs/reg_proj.jpg"><img alt="[Thumbnail image: A confidence plot showing the nH (X axis) and gamma (Y axis) values. The best-fit location and three contours (representing 1, 2, and 3 sigma) are displayed.]" src="imgs/reg_proj_small.jpg"></a><p class="figures">[Version: <a href="imgs/reg_proj.jpg">full-size</a>]</p> </div> <div class="printmedia"><img alt="[Print media version: A confidence plot showing the nH (X axis) and gamma (Y axis) values. The best-fit location and three contours (representing 1, 2, and 3 sigma) are displayed.]" src="imgs/reg_proj.jpg"></div> </div></div> <div class="clearfloat"></div> </div> </div> </div> <div> <p> The Sherpa infrastructure greatly enhances the default Sherpa functions, and provides users with an environment for developing complex and sophisticated analysis. </p> <p> Sherpa is designed for use in a variety of modes: as a user-interactive application and in batch mode. Sherpa is an importable module for the <a href="https://www.python.org">Python</a> the scripting language. In addition, users may write their own Python scripts for use in Sherpa. </p> <p> The <a href="about.html">About Sherpa</a> page outlines key features of the software, and the <a href="updates.html">Latest Updates</a> page describes new functionality and recent changes. See also the <a href="index.html#apj2024">Siemiginowska et al. (2024)</a> paper for detailed information about Sherpa's capabilities. </p> <p> If you have ideas about how to enhance or improve Sherpa, please contribute ideas (and code) to the <a href="https://github.com/sherpa/sherpa">Sherpa GitHub repository</a>. </p> <p> Please send feedback and questions on Sherpa to the <a title="CXC Helpdesk" href="/help/">CXC Helpdesk</a> or the <a href="https://github.com/sherpa/sherpa/issues">Sherpa Issues list on GitHub</a>. </p> </div> <hr> <section id="citations"> <h2>Citing <em>Sherpa</em> in a Publication</h2> <p> The <span class="tt">sherpa.citation</span> method will return infromation from the <a href="https://doi.org/10.5281/zenodo.593753">latest release</a> on <a href="https://zenodo.org/">Zenodo</a>: </p> <div class="screen"><pre class="highlight"> sherpa&gt; sherpa.citation('latest') </pre></div> <p> If you are writing a paper and would like to cite <em>Sherpa</em>, we recommend the following papers and presentations. The specific version of <a href="/ciao/releasenotes/history.html">CIAO</a> and <a href="/caldb/downloads/releasenotes.html">CALDB</a> (if applicable) used for the analysis should be mentioned as well. </p> <dl class="citations"> <dt id="apj2024"> <strong>Sherpa: An Open-source Python Fitting Package</strong> (<a href="https://ui.adsabs.harvard.edu/abs/2024ApJS..274...43S/abstract">ADS</a>) <img src="imgs/new.gif" alt="[New]"> </dt> <dd> <p class="authors"> Siemiginowska, Aneta, Burke, Douglas, Günther, Hans Moritz, Lee, Nicholas P., McLaughlin, Warren, Principe, David A., Cheer, Harlan, Fruscione, Antonella, Laurino, Omar, McDowell, Jonathan, Terrell, Marie <br> <em>The Astrophysical Journal Supplement Series, Volume 274, Issue 2, id. 43.</em> </p> <pre class="bibitem"> \bibitem[Siemiginowska et al.(2024)]{2024ApJS..274...43S} Siemiginowska, A., Burke, D., G{\"u}nther, H.~M., et al.\ 2024, \apjs, 274, 43. doi:10.3847/1538-4365/ad7bab </pre> </dd> <dt> <strong>Sherpa: a mission-independent data analysis application</strong> (<a href="https://adsabs.harvard.edu/abs/2001SPIE.4477...76F">ADS</a>) </dt> <dd> <p class="authors"> P. E. Freeman, S. Doe, A. Siemiginowska <br><em>SPIE Proceedings, Vol. 4477, p.76, 2001</em> </p> <pre class="bibitem">\bibitem[Freeman et al.(2001)]{2001SPIE.4477...76F} Freeman, P., Doe, S., \&amp; Siemiginowska, A.\ 2001, \procspie, 4477, 76</pre> </dd> <dt> <strong>Developing Sherpa with Python</strong> (<a href="https://adsabs.harvard.edu/abs/2007ASPC..376..543D">ADS</a>) </dt> <dd> <p class="authors"> S. Doe, et al. <br><em>Astronomical Data Analysis Software and Systems XVI, 376, 543</em> </p> <pre class="bibitem">\bibitem[Doe et al.(2007)]{2007ASPC..376..543D} Doe, S., et al.\ 2007, Astronomical Data Analysis Software and Systems XVI, 376, 543</pre> <p> A reference for the Python interface to <em>Sherpa</em>. </p> </dd> <dt> <strong>Sherpa: 1D/2D modeling and fitting in Python</strong> (<a href="https://proceedings.scipy.org/articles/DVMY8107">SciPy 2009</a>) </dt> <dd> <p class="authors"> B. Refsdal, S. Doe, D. Nguyen, A. Siemiginowska, N. Bonaventura, D. Burke, I. Evans, J. Evans, A. Fruscione, E. Galle, J. Houck, M. Karovska, N. Lee, M. Nowak <br> <em>Proceedings of the 8th Python in Science Conference (SciPy 2009), G. Varoquaux, S. van der Walt, J. Millman (Eds.), pp. 51-57 2009</em> </p> </dd> <dt> <strong>Fitting and Estimating Parameter Confidence Limits with Sherpa</strong> <a href="https://proceedings.scipy.org/articles/Majora-ebaa42b7-001">(SciPy 2011)</a> </dt> <dd> <p class="authors"> B. Refsdal, S. Doe, D. Nguyen, A. Siemiginowska, V. Kashyap <br> <em>Proceedings of the 19th Python in Science Conference (SciPy 2011), S. van der Walt, J. Millman (Eds.), pp. 4-10 2011</em> </p> </dd> </dl> <p> Further guidelines are available from the <a href="/cda/acknowledgment.html">Acknowledgment of Use of Chandra Resources</a>. </p> </section> </div></main><aside id="navbar"><div id="navtext" class="wrap"> <!-- THIS FILE IS CREATED AUTOMATICALLY - DO NOT EDIT MANUALLY --> <!-- SEE: /data/da/Docs/sherpaweb/ciao417/navbar.xml --> <!--htdig_noindex--> <div> <p class="navimage"><a href="/sherpa4.17/"><img src="imgs/sherpa_logo_navbar.gif" alt="[Sherpa Logo]"></a></p> <ul id="navlist"> <li> <span class="navheader" onclick="void(0)"><span class="selectedheading">Introduction</span><span class="hassubmenu">➤</span></span><ul> <li><a href="index.html">Home page</a></li> <li><a href="about.html">About Sherpa</a></li> <li><a href="updates.html">Latest Updates</a></li> <li> <a href="http://pysherpa.blogspot.com/">Sherpa Blog</a> </li> </ul> </li> <li> <span class="navheader" onclick="void(0)"><span class="heading">Documentation</span><span class="hassubmenu">➤</span></span><ul> <li><a href="gallery/thumbnails.html">Gallery of Examples</a></li> <li><a href="snapshot.html">Sherpa Snapshot</a></li> <li><a href="threads/index.html">Sherpa Threads</a></li> <li><a href="scripts/index.html">Quick Scripts</a></li> <li><a href="models">Models</a></li> <li><a href="statistics">Statistics</a></li> <li><a href="methods/index.html">Optimization Methods</a></li> <li><a title="Sherpa Frequently Asked Questions" href="faq/index.html">FAQ</a></li> <li><a href="bugs/index.html">Known Issues and Limitations</a></li> <li><a href="references/index.html">References</a></li> </ul> </li> <li> <span class="navheader" onclick="void(0)"><span class="heading">Help Pages</span><span class="hassubmenu">➤</span></span><ul> <li>AHELP: <a class="helplink" title="Ahelp index (Sherpa)" href="ahelp/index_alphabet.html">Alphabetical</a> </li> <li>AHELP: <a class="helplink" title="Ahelp index (Sherpa)" href="ahelp/index_context.html">By context</a> </li> <li><a class="helplink" title="Ahelp index (Sherpa)" href="ahelp/index.html">Using ahelp</a></li> <li><a href="/ciao/visualization/chips/index.html">ChIPS to Matplotlib Conversion Guide</a></li> <li><a href="python/index.html">Python Resources</a></li> </ul> </li> <li> <span class="navheader" onclick="void(0)"><span class="heading">Download Software</span><span class="hassubmenu">➤</span></span><ul> <li><a href="/ciao/download/index.html">Download CIAO/Sherpa</a></li> <li><a href="/ciao/download/scripts/#Sherpa">Contributed Sherpa Scripts</a></li> <li><a href="contrib.html">Sherpa Python Packages</a></li> </ul> </li> <li> <span class="navheader" onclick="void(0)"><span class="heading">Sherpa for Python</span><span class="hassubmenu">➤</span></span><ul> <li><a href="https://github.com/sherpa/sherpa"> Sherpa on GitHub</a></li> <li><a href="contrib.html">Sherpa Python Packages</a></li> </ul> </li> <li> <span class="navheader" onclick="void(0)"><span class="heading">Other Analysis Threads</span><span class="hassubmenu">➤</span></span><ul> <li><a href="/ciao/threads/index.html">Science (CIAO)</a></li> <li><a href="/ciao/threads/psf.html">PSF Simulations</a></li> </ul> </li> <li> <span class="navheader" onclick="void(0)"><span class="heading">CXC Links</span><span class="hassubmenu">➤</span></span><ul> <li><a href="/ciao">CIAO (Data Analysis)</a></li> <li> <a href="http://hea-www.harvard.edu/AstroStat/">Astrostatistics Collaboration</a> </li> </ul> </li> <li> <span class="navheader" onclick="void(0)"><span class="heading">CIAO on social media</span></span><br> <a href="https://www.facebook.com/pages/Chandra-CIAO/398626126963760"><img src="/ciao/imgs/fb30.png" alt="facebook"></a> <a href="https://twitter.com/chandraCIAO"><img src="/ciao/imgs/tw30.png" alt="twitter"></a> <a href="https://plus.google.com/u/1/b/102686336185745595116/106646243896552205567/about"><img src="/ciao/imgs/g+30.png" alt="twitter"></a> <a href="https://www.youtube.com/user/4ciaodemos"><img src="/ciao/imgs/yt30.png" alt="youtube"></a> <a href="/ciao/feed.xml"><img src="/ciao/imgs/rss30.png" alt="RSS"></a> </li> </ul> </div> <!--/htdig_noindex--> </div></aside><footer><div class="bottombar withnavbar"><div class="lastmodbar">Last modified: 11 December 2024</div></div> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-16357924-3"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-16357924-3'); </script> <div id="cxcfooter"> <div id="cxcfooterleft"> <!-- <img src="/incl/cxcfooterCXCicon.png" alt="CXC logo" > <a href="http://www.si.edu"><img src="/incl/cxc_saologo.png" alt = "Smithsonian Institute"></a>--> <a href="/index.html"><img src="/incl/cxcfooterCXCicon.png" alt = "Smithsonian Institute"></a> <a href="http://www.si.edu"><img src="/incl/smithsonian.png" alt = "Smithsonian Institute"></a> </div> <div id="cxcfooterright"> <ul> <li><a href="/index.html">CXC Home</a></li> <!-- <li><a href="/cdo/cxcstaff/cxcstaff.php">CXC Scientists</a></li>--> <li><a href="/cdo/observatory_links.html#NASA">NASA Archives and Centers</a></li> <li><a href="/cdo/observatory_links.html">Astronomy Links</a></li> <li><a href="http://icxc.harvard.edu/">iCXC (CXC only)</a></li> <li><a href="http://cxc.harvard.edu/help/">Helpdesk</a></li> </ul> <p><em>The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.</em> 60 Garden Street, Cambridge, MA 02138 USA.&nbsp;&nbsp; Email: &nbsp; <a style="color:white;" href="mailto:cxchelp@head.cfa.harvard.edu">cxchelp@head.cfa.harvard.edu</a> Smithsonian Institution, Copyright &copy; 1998-2025. All rights reserved. </p> </div> <!-- <div style="float:right;width: 8%;"> <a href="http://si.edu"><img src="/incl/smithsonian.png" alt="SI logo" style="float:right"></a> </div> --> </div> </footer> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10