Thursday, December 20, 2012

New version of Sherpa in CIAO 4.5 Release

New Sherpa version was included in CIAO 4.5 software release on Dec.13, 2012. Here is the CIAO download page: http://cxc.harvard.edu/ciao/download/
The standalone Sherpa will be coming in early January 2013.

New Sherpa is build with Python 2.7.2 and IPython 0.13.


Friday, August 3, 2012

Standalone Sherpa 4.4.1 Released

I have released the standalone version of Sherpa 4.4.1 at the Sherpa website:

http://cxc.cfa.harvard.edu/contrib/sherpa/

As in past releases, the purpose is to allow Python users to install Sherpa as a Python module, without reference to any other CIAO package or program.

I release the source code tarball, sherpa-4.4.1.tar.gz, that contains all the Sherpa source code we released with CIAO 4.4.1.  Release notes can be found at NOTES-4.4.1.txt.  The new version is also available at the cxcdev github repository for Sherpa.

This is a minor patch update.  I have added support for the XSPEC 12.7.1 libraries, and interfaces to seven new additive models.  The Sherpa 4.4.0 tarball is still available in the download directory.

I am also working on Mac disk images.  I am nearly done with them, thanks to input from Brian a little while back.

Wednesday, June 6, 2012

Goodness of Fit with CSTAT/CASH

Sherpa has two statistics derived from the Poisson likelihood called Cash and CSTAT.  In this case the measure of goodness of fit requires simulations. Sherpa sampling functions make these simulations really easy.  After fitting the data using these statistics one can simply use a sampler and plot the resulting distributions. The sampler will generate a number of parameter sets using the sampling distribution  (normal, t, uniform) centered on the best fit parameter values. One can then check whether
the CSTAT or Cash values given for these parameters are largely different than the ones obtained by fitting the data.

fit()
sim = normal_sample( num=1000 )
plot_cdf( sim[ :, 0] )

plotting the cummulative distribution of the statistic values provides immediate visualization of
the best fit statistics in comparison to the simulations. The best fit statistic values should be close to the 0.5 in the cdf, so about 50% of the values. If the best fit statistics value is not close to 50% in the cdf plot then the fit is not good.

Using numpy we can also check the minimum and median of the simulated distribution in comparison to the best fit values.

# first check the current statistics, then check the simulations:

calc_stat_info()
numpy.min( sim[ :, 0 ])
numpy.median( sim[ :, 0 ])

Tuesday, May 29, 2012

Doug is presenting Python Fitting and Modeling Tutorial using Sherpa today!
http://python4astronomers.github.com/fitting/fitting.html

Tuesday, February 7, 2012

Standalone Sherpa 4.4 Released

I have released the standalone version of Sherpa 4.4 at the Sherpa website:

http://cxc.cfa.harvard.edu/contrib/sherpa/

As in past releases, the purpose is to allow Python users to install Sherpa as a Python module, without reference to any other CIAO package or program.

I release the source code tarball, sherpa-4.4.0.tar.gz, that contains all the Sherpa source code we released with CIAO 4.4.  Release notes can be found at NOTES-4.4.0.txt.

As time permits, I will go on to add Mac disk images, and/or eggs for Linux, for binary installations of Sherpa.  When these binaries are ready I shall post an update here.