Release Notes

Version 2.0.0 Nov 2016 [XSPEC 12.9.1]

(*) = previously available as XSPEC patches

New Features

  • Now compatible with Python 3.x. (No longer compatible with Python versions prior to 2.5.)
  • Added Xset.save() and restore() functions for saving and recovering the state of a PyXspec session.
  • New adjustable attributes for the Chain class: walkers and algorithm.*
  • AllModels.tclLoad() method added to provide a lower-level alternative to the lmod() local model loading scheme.*
  • Xset.allowPrompting attribute provides option for turning on/off XSPEC prompting. This can be useful in iPython environments where certain contexts can lead to infinite prompting loops.
  • PyXspec manuals have been converted from Doxygen-generated to Sphinx-generated HTML and PDF.

Fixes

  • Was previously unable to unlink a linked parameter in a Python-coded local model.*

Version 1.1.0 Jul 2015 [XSPEC 12.9.0]

New Features

  • Local models may now be written in Python and inserted into XSPEC’s models library with new AllModels.addPyMod() function.
  • The plot array retrieval interface (ie. Plot.x(), Plot.y()) has been expanded to allow retrieval from secondary plot panels in a mulit-panel plot.
  • New Parameter.index attribute.
  • New backscale attribute for Spectrum and Background classes.
  • Added new function Fit.stepparResults() for retrieving results of most recent steppar run. (Previously available as a patch)
  • New noWrite option added to AllData.fakeit (Previously available as patch)

Fixes

  • The Model.__call__ function now returns Parameter objects by reference rather than by value. This is to allow the returned object to retain any custom attributes the user may have added.
  • Improved handling of Ctrl-c breaking in several prompting contexts.

Version 1.0.4 Jul 2014 [XSPEC 12.8.2]

  • Added Fit.testStatistic attribute for retrieving the test statistic value from the most recent fit.
  • Added compiler macros for switching to <Python/Python.h> include paths when building on Mac platforms.
  • Bug fix for get/set Spectrum.correction files on OS X Mavericks.

Version 1.0.3 Aug 2013 [XSPEC 12.8.1]

  • The Fit.statMethod and statTest attributes can now be set for a range of individual spectra rather than only applying to all.
  • Bug fix to the RModel class (ie. the class of the Response.gain attribute). If the user assigned multiple RModel objects to point to the same underlying XSPEC response gain, changes made through one object weren’t necessarily showing up in the other objects. This also fixes a related bug created in Xspec patch 12.8.0l that caused a list of error messages to appear (only) in Python versions 2.6.x.

Version 1.0.2 Jan 2013

  • Added Xset.parallel attribute, with options ‘leven’ and ‘error’ for setting parallel processes.
  • Added Fit.statTest attribute for getting/setting the XSPEC test statistic.

Version 1.0.1 Dec 2012 [XSPEC 12.8.0]

  • 2 additions to the Spectrum class: an ignored attribute and an ignoredString() function. The former returns a Python list object containing every ignored channel number. The latter returns the same information in convenient string form, which can be reused as input to a future ignore or notice command.

Version 1.0 Feb 2012 [XSPEC 12.7.1]

Changes relative to the PyXspec Beta version:

Warning

Two Backwards-Incompatible Changes:

  • When using multiple data groups, the Model objects assigned to the higher-numbered groups now all have their parameters indexed from 1 to nPar. For example with a 3 parameter model applied to 2 data groups, you would now access the first parameter in the 2nd model object with mod2(1) rather than mod2(4).
  • The Model.setPars() function (introduced with patch 12.7.0f) used the p`n` keyword argument syntax to set non-consecutive parameters. This has been replaced. with the use of Python dictionaries. For example, m.setPars(p2=.3, p4=1.1) should now be m.setPars({2:.3, 4:1.1}).

New Features

  • Added Standard XSPEC’s gain command functionality. This is implemented with the new gain attribute for Response classes. Response.gain is a class of type RModel, and has two Parameter objects: slope and intercept.

  • New AllModels.setPars() function for changing multiple parameters in multiple Model objects with a single call.

  • Now compatible with Cygwin.

    Features Previously Added As Patches To XSPEC 12.7.0

  • AllModels.initpackage() for building local models inside the Python shell.

  • Bayesian inference provided through the Fit.bayes and Parameter.prior attributes.

  • Fit.goodness() and Fit.improve() functions.

  • Model.setPars() function for changing multiple parameters with a single call.

  • AllModels.simpars() function to do the equivalent of Standard XSPEC’s tclout simpars.

  • Fit.covariance attribute for retrieving the covariance matrix from the most recent fit.

  • Model.expression attribute which stores the model expression string.

  • AllModels.sources attribute which stores a map of source number and model name assignments.

Fixes

  • All PyXspec bug fixes previously released as patches to XSPEC 12.7.0 are included.
  • Now handles model component-by-name access when the component is a table model whose name includes whitespace.