BXA connects the X-ray spectral analysis environments Xspec/Sherpa to the nested sampling algorithm UltraNest for Bayesian Parameter Estimation and Model comparison.
BXA provides the following features:
BXA shines especially
because its robust and unsupervised fitting algorithm explores
even complicated parameter spaces in an automated fashion.
The user does not need to initialise to good starting points.
The algorithm <https://johannesbuchner.github.io/UltraNest/method.html>
_ automatically runs until convergence, and slows down to sample
carefully if complicated parameter spaces are encountered. This allows building automated analysis pipelines.
.. image:: https://img.shields.io/pypi/v/BXA.svg :target: https://pypi.python.org/pypi/BXA
.. image:: https://coveralls.io/repos/github/JohannesBuchner/BXA/badge.svg :target: https://coveralls.io/github/JohannesBuchner/BXA
.. image:: https://img.shields.io/badge/docs-published-ok.svg :target: https://johannesbuchner.github.io/BXA/ :alt: Documentation Status
.. image:: https://img.shields.io/badge/GitHub-JohannesBuchner%2FBXA-blue.svg?style=flat :target: https://github.com/JohannesBuchner/BXA/ :alt: Github repository
you <https://ui.adsabs.harvard.edu/search/q=citations(bibcode%3A2014A%26A...564A.125B)%20full%3A%22BXA%22&sort=date%20desc%2C%20bibcode%20desc&p_=0>
_?BXA's documentation <http://johannesbuchner.github.io/BXA/>
_ is hosted at http://johannesbuchner.github.io/BXA/
First, you need to have either Sherpa
or Xspec
installed and its environment loaded.
BXA itself can installed easily using pip or conda::
$ pip install bxa
If you want to install in your home directory, install with::
$ pip install bxa --user
The following commands should not yield any error message::
$ python -c 'import ultranest'
$ python -c 'import xspec'
$ sherpa
You may need to install python and some basic packages through your package manager. For example::
$ yum install ipython python-matplotlib scipy numpy matplotlib
$ apt-get install python-numpy python-scipy python-matplotlib ipython
BXA requires the following python packages: requests corner astropy h5py cython scipy tqdm. They should be downloaded automatically. If they are not, install them also with pip/conda.
The source code is available from https://github.com/JohannesBuchner/BXA, so alternatively you can download and install it::
$ git clone https://github.com/JohannesBuchner/BXA
$ cd BXA
$ python setup.py install
Or if you only want to install it for the current user::
$ python setup.py install --user
Supported operating systems:
BXA runs on all operating systems supported by
ciao/sherpa <https://cxc.cfa.harvard.edu/ciao/watchout.html#install>
or
heasoft/xspec <https://heasarc.gsfc.nasa.gov/lheasoft/issues.html>
.
The support is systematically tested for every BXA release by
Travis CI <https://travis-ci.com/github/JohannesBuchner/BXA>
_, but only for Ubuntu Linux.
In Sherpa, load the package::
jbuchner@ds42 ~ $ sherpa
-----------------------------------------------------
Welcome to Sherpa: CXC's Modeling and Fitting Package
-----------------------------------------------------
CIAO 4.4 Sherpa version 2 Tuesday, June 5, 2012
sherpa-1> import bxa.sherpa as bxa
sherpa-2> bxa.BXASolver?
For Xspec, start python or ipython::
jbuchner@ds42 ~ $ ipython
In [1]: import xspec
In [2]: import bxa.xspec as bxa
In [3]: bxa.BXASolver?
Now you can use BXA. See the documentation pages for how to perform analyses. Several examples are included.
.. _ultranest: http://johannesbuchner.github.io/UltraNest/
.. _Sherpa: http://cxc.harvard.edu/sherpa/
.. _Xspec: http://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/
See the code repository page <https://github.com/JohannesBuchner/BXA>
_
.. _cite:
Refer to the accompaning paper Buchner et al. (2014) <http://www.aanda.org/articles/aa/abs/2014/04/aa22971-13/aa22971-13.html>
_ which gives introduction and
detailed discussion on the methodology and its statistical footing.
We suggest giving credit to the developers of Sherpa/Xspec, UltraNest and of this software. As an example::
For analysing X-ray spectra, we use the analysis software BXA (\ref{Buchner2014}),
which connects the nested sampling algorithm UltraNest (\ref{ultranest})
with the fitting environment CIAO/Sherpa (\ref{Fruscione2006}).
Where the BibTex entries are:
for BXA and the contributions to X-ray spectral analysis methodology (model comparison, model discovery, Experiment design, Model discovery through QQ-plots):
arXiv:1402.0004 <http://arxiv.org/abs/arXiv:1402.0004>
_bibtex entry <https://ui.adsabs.harvard.edu/abs/2014A%26A...564A.125B/exportcitation>
_for UltraNest: see https://johannesbuchner.github.io/UltraNest/issues.html#how-should-i-cite-ultranest
for Sherpa: see Sherpa
_
for Xspec: see Xspec
_