ASPCS
 
Back to Volume
Paper: Advanced Python Scripting Using Sherpa
Volume: 442, Astronomical Data Analysis Software and Systems XX (ADASSXX)
Page: 687
Authors: Refsdal, R.; Doe, S.; Nguyen, D.; Siemiginowska, A.; Burke, D.; Evans, J.; Evans, I.
Abstract: Sherpa is a general purpose modeling and fitting application written in Python. The dynamism of Python allows Sherpa to be a powerful and extensible software package ready for the modern challenges of data analysis. Primarily developed for the Chandra Interactive Analysis of Observations (CIAO) package, it provides a flexible environment for resolving spectral and image properties, analyzing time series, and modeling generic types of data. Complex model expressions are supported using Sherpa's general purpose definition syntax. Sherpa's parameterized data modeling is achieved using robust optimization methods implementing the forward fitting technique. Sherpa includes functions to calculate goodness–of–fit and parameter confidence limits. CPU intensive routines are written in C++/FORTRAN. But since all other data structures are contained in Python modules, users can easily add their own data structures, models, statistics or optimization methods to Sherpa. We will introduce a scripted example that highlights Sherpa's ability to estimate energy and photon flux errors using simulations. The draws from these simulations, accessible as NumPy ndarrays, can be sampled from uni–variate and multi–variate normal distributions and can be binned and visualized with simple high level functions. We will demonstrate how Sherpa can be extended with user–defined model and statistic classes written in Python. Sherpa's open design even allows users to incorporate prior statistics derived from the source model.
Back to Volume