About Bayesian X-ray Analysis (BXA)
------------------------------------
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:
* parameter estimation in arbitrary dimensions, which involves:
* finding the best fit
* computing error bars
* computing marginal probability distributions
* parallelisation with MPI
* plotting of spectral model vs. the data:
* for the best fit
* for each of the solutions (posterior samples)
* for each component
* model selection:
* computing the evidence for the considered model,
ready for use in Bayes factors
* unlike likelihood-ratios, not limited to nested models
* model discovery:
* visualize deviations between model and data with Quantile-Quantile (QQ) plots.
QQ-plots do not require binning and are more comprehensive than residuals.
This will give you ideas on when to introduce more complex models, which
may again be tested with model selection
BXA shines especially
* when systematically analysing a large data-set, or
* when comparing multiple models
* when analysing low counts data-set with realistic models
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
Who is using BXA?
-------------------------------
* Dr. Antonis Georgakakis, Dr. Angel Ruiz (NOA, Athens)
* Dr. Mike Anderson (MPA, Munich)
* Dr. Franz Bauer, Charlotte Simmonds (PUC, Jonathan Quirola Vásquez, Santiago)
* Dr. Stéphane Paltani, Dr. Carlo Ferrigno (ISDC, Geneva)
* Dr. Zhu Liu (NAO, Beijing)
* Dr. Georgios Vasilopoulos (Yale, New Haven)
* Dr. Francesca Civano, Dr. Aneta Siemiginowska (CfA/SAO, Cambridge)
* Dr. Teng Liu, Adam Malyali, Riccardo Arcodia, Sophia Waddell, Torben Simm, ... (MPE, Garching)
* Dr. Sibasish Laha, Dr. Alex Markowitz (UCSD, San Diego)
* Dr. Arash Bahramian (Curtin University, Perth)
* Dr. Peter Boorman (U of Southampton, Southampton; ASU, Prague)
* and `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>`_?
Documentation
----------------
BXA's `documentation <http://johannesbuchner.github.io/BXA/>`_ is hosted at http://johannesbuchner.github.io/BXA/
Installation
-------------
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.
Running
--------------
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/
Code
-------------------------------
See the `code repository page <https://github.com/JohannesBuchner/BXA>`_
.. _cite:
Citing BXA correctly
---------------------
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):
- Buchner et al. (2014) A&A
- The paper is available at `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`_
Raw data
{
"_id": null,
"home_page": "https://github.com/JohannesBuchner/BXA/",
"name": "bxa",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Johannes Buchner",
"author_email": "johannes.buchner.acad@gmx.com",
"download_url": "https://files.pythonhosted.org/packages/18/48/b2a4217391f31f0ab326ac731a4a983a3fad66d94db77940e5672a2fcae7/bxa-4.1.4.tar.gz",
"platform": null,
"description": "About Bayesian X-ray Analysis (BXA)\n------------------------------------\n\nBXA connects the X-ray spectral analysis environments Xspec/Sherpa\nto the nested sampling algorithm UltraNest \nfor **Bayesian Parameter Estimation** and **Model comparison**.\n\nBXA provides the following features:\n\n* parameter estimation in arbitrary dimensions, which involves:\n * finding the best fit\n * computing error bars\n * computing marginal probability distributions\n * parallelisation with MPI\n* plotting of spectral model vs. the data:\n * for the best fit\n * for each of the solutions (posterior samples)\n * for each component\n* model selection:\n * computing the evidence for the considered model, \n ready for use in Bayes factors\n * unlike likelihood-ratios, not limited to nested models \n* model discovery:\n * visualize deviations between model and data with Quantile-Quantile (QQ) plots.\n QQ-plots do not require binning and are more comprehensive than residuals.\n This will give you ideas on when to introduce more complex models, which \n may again be tested with model selection\n\nBXA shines especially\n\n* when systematically analysing a large data-set, or\n* when comparing multiple models\n* when analysing low counts data-set with realistic models\n\nbecause its robust and unsupervised fitting algorithm explores\neven complicated parameter spaces in an automated fashion.\nThe user does not need to initialise to good starting points.\nThe `algorithm <https://johannesbuchner.github.io/UltraNest/method.html>`_ automatically runs until convergence, and slows down to sample\ncarefully if complicated parameter spaces are encountered. This allows building automated analysis pipelines.\n\n.. image:: https://img.shields.io/pypi/v/BXA.svg\n :target: https://pypi.python.org/pypi/BXA\n\n.. image:: https://coveralls.io/repos/github/JohannesBuchner/BXA/badge.svg\n :target: https://coveralls.io/github/JohannesBuchner/BXA\n\n.. image:: https://img.shields.io/badge/docs-published-ok.svg\n :target: https://johannesbuchner.github.io/BXA/\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/badge/GitHub-JohannesBuchner%2FBXA-blue.svg?style=flat\n :target: https://github.com/JohannesBuchner/BXA/\n :alt: Github repository\n\nWho is using BXA?\n-------------------------------\n\n* Dr. Antonis Georgakakis, Dr. Angel Ruiz (NOA, Athens)\n* Dr. Mike Anderson (MPA, Munich)\n* Dr. Franz Bauer, Charlotte Simmonds (PUC, Jonathan Quirola V\u00e1squez, Santiago)\n* Dr. St\u00e9phane Paltani, Dr. Carlo Ferrigno (ISDC, Geneva)\n* Dr. Zhu Liu (NAO, Beijing)\n* Dr. Georgios Vasilopoulos (Yale, New Haven)\n* Dr. Francesca Civano, Dr. Aneta Siemiginowska (CfA/SAO, Cambridge)\n* Dr. Teng Liu, Adam Malyali, Riccardo Arcodia, Sophia Waddell, Torben Simm, ... (MPE, Garching)\n* Dr. Sibasish Laha, Dr. Alex Markowitz (UCSD, San Diego)\n* Dr. Arash Bahramian (Curtin University, Perth)\n* Dr. Peter Boorman (U of Southampton, Southampton; ASU, Prague)\n* and `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>`_?\n\nDocumentation\n----------------\n\nBXA's `documentation <http://johannesbuchner.github.io/BXA/>`_ is hosted at http://johannesbuchner.github.io/BXA/\n\nInstallation\n-------------\n\nFirst, you need to have either `Sherpa`_ or `Xspec`_ installed and its environment loaded.\n\nBXA itself can installed easily using pip or conda::\n\n\t$ pip install bxa\n\nIf you want to install in your home directory, install with::\n\n\t$ pip install bxa --user\n\nThe following commands should not yield any error message::\n\n\t$ python -c 'import ultranest'\n\t$ python -c 'import xspec'\n\t$ sherpa\n\nYou may need to install python and some basic packages through your package manager. For example::\n\n\t$ yum install ipython python-matplotlib scipy numpy matplotlib\n\t$ apt-get install python-numpy python-scipy python-matplotlib ipython\n\nBXA requires the following python packages: requests corner astropy h5py cython scipy tqdm.\nThey should be downloaded automatically. If they are not, install them\nalso with pip/conda.\n\nThe source code is available from https://github.com/JohannesBuchner/BXA,\nso alternatively you can download and install it::\n\t\n\t$ git clone https://github.com/JohannesBuchner/BXA\n\t$ cd BXA\n\t$ python setup.py install\n\nOr if you only want to install it for the current user::\n\n\t$ python setup.py install --user\n\n**Supported operating systems**: \nBXA runs on all operating systems supported by \n`ciao/sherpa <https://cxc.cfa.harvard.edu/ciao/watchout.html#install>`_ or \n`heasoft/xspec <https://heasarc.gsfc.nasa.gov/lheasoft/issues.html>`_.\nThe support is systematically tested for every BXA release by \n`Travis CI <https://travis-ci.com/github/JohannesBuchner/BXA>`_, but only for Ubuntu Linux.\n\n\nRunning\n--------------\n\nIn *Sherpa*, load the package::\n\n\tjbuchner@ds42 ~ $ sherpa\n\t-----------------------------------------------------\n\tWelcome to Sherpa: CXC's Modeling and Fitting Package\n\t-----------------------------------------------------\n\tCIAO 4.4 Sherpa version 2 Tuesday, June 5, 2012\n\n\tsherpa-1> import bxa.sherpa as bxa\n\tsherpa-2> bxa.BXASolver?\n\nFor *Xspec*, start python or ipython::\n\t\n\tjbuchner@ds42 ~ $ ipython\n\tIn [1]: import xspec\n\t\n\tIn [2]: import bxa.xspec as bxa\n\t\n\tIn [3]:\tbxa.BXASolver?\n\nNow you can use BXA. See the documentation pages for how\nto perform analyses. Several examples are included.\n\n.. _ultranest: http://johannesbuchner.github.io/UltraNest/\n\n.. _Sherpa: http://cxc.harvard.edu/sherpa/\n\n.. _Xspec: http://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/\n\nCode\n-------------------------------\n\nSee the `code repository page <https://github.com/JohannesBuchner/BXA>`_ \n\n.. _cite:\n\nCiting BXA correctly\n---------------------\n\nRefer 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 \ndetailed discussion on the methodology and its statistical footing.\n\nWe suggest giving credit to the developers of Sherpa/Xspec, UltraNest and of this software.\nAs an example::\n\n\tFor analysing X-ray spectra, we use the analysis software BXA (\\ref{Buchner2014}),\n\twhich connects the nested sampling algorithm UltraNest (\\ref{ultranest})\n\twith the fitting environment CIAO/Sherpa (\\ref{Fruscione2006}).\n\nWhere the BibTex entries are:\n\n* for BXA and the contributions to X-ray spectral analysis methodology (model comparison, model discovery, Experiment design, Model discovery through QQ-plots):\n\n\t- Buchner et al. (2014) A&A\n\t- The paper is available at `arXiv:1402.0004 <http://arxiv.org/abs/arXiv:1402.0004>`_\n\t- `bibtex entry <https://ui.adsabs.harvard.edu/abs/2014A%26A...564A.125B/exportcitation>`_\n\n* for UltraNest: see https://johannesbuchner.github.io/UltraNest/issues.html#how-should-i-cite-ultranest\n* for Sherpa: see `Sherpa`_\n* for Xspec: see `Xspec`_\n",
"bugtrack_url": null,
"license": "GNU General Public License v3",
"summary": "Bayesian X-ray spectral analysis",
"version": "4.1.4",
"project_urls": {
"Homepage": "https://github.com/JohannesBuchner/BXA/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "07c8940bf1fd28e947f5d873c529a3f37017ade3751e92e859a5a77fa916878e",
"md5": "a3e4205a16db11ff2752be6269f4d4a2",
"sha256": "b510e7dde48ebdcea8241b83ad99d924e39b66605ca3d65c4d3f200b0e7108dc"
},
"downloads": -1,
"filename": "bxa-4.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a3e4205a16db11ff2752be6269f4d4a2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3962929,
"upload_time": "2024-05-26T18:31:21",
"upload_time_iso_8601": "2024-05-26T18:31:21.663522Z",
"url": "https://files.pythonhosted.org/packages/07/c8/940bf1fd28e947f5d873c529a3f37017ade3751e92e859a5a77fa916878e/bxa-4.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1848b2a4217391f31f0ab326ac731a4a983a3fad66d94db77940e5672a2fcae7",
"md5": "2adc81e91e6720566742bbd2585f174c",
"sha256": "ca6f5cfeba2588dd89e3433db13b0c7e23f679d3de1c85aa0f5490be368e4106"
},
"downloads": -1,
"filename": "bxa-4.1.4.tar.gz",
"has_sig": false,
"md5_digest": "2adc81e91e6720566742bbd2585f174c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3909075,
"upload_time": "2024-05-26T18:31:28",
"upload_time_iso_8601": "2024-05-26T18:31:28.508793Z",
"url": "https://files.pythonhosted.org/packages/18/48/b2a4217391f31f0ab326ac731a4a983a3fad66d94db77940e5672a2fcae7/bxa-4.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-26 18:31:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JohannesBuchner",
"github_project": "BXA",
"travis_ci": true,
"coveralls": true,
"github_actions": true,
"lcname": "bxa"
}