Skip to content

Welcome

Welcome to (B)SIXSA's documentation!

(B)SIXSA is a friendly implementation of the simulation-based inference methodology developed in the "SBI with NPE applied to X-ray spectral fitting" paper serie12. In originally started as a fork the Bayesian X-ray Analysis toolkit (BXA) and implements a similar syntax using xspec as a backend. Nowaday, bsixsa has evolved as a general purpose wrapper around xspec that supports a wide range of fitting and sampling methods.

Installation

The package is not yet deployed on PyPI. However, it should be easy to install it from the source code. The following procedure is recommended.

First create a clean environment with xspec installed.

mamba create -n bsixsa python=3.12 xspec xspec-data -c https://heasarc.gsfc.nasa.gov/FTP/software/conda/
conda activate bsixsa # Activate the environment

Then install the package from pypi.

pip install uv # uv is recommended as it is faster than pip and better handles dependencies
uv pip install bsixsa

You can now install the extra samplers you want to use.

uv pip install jupyterlab ipywidgets nessai nautilus-sampler # Install nautilus and nessai 

If you require to work with the most recent version, install it directly from the source code.

uv pip install git+https://github.com/renecotyfanboy/bsixsa

Current limitations

While we do not explicitly support multi-observation fitting and background, solvers using only the likelihood should work correctly.

  • Plotting: the plotters currently support the first spectrum. Also, there is no background support for plotting yet.
  • Flux: flux computation is not yet supported.
  • Cross-calibration: cross-calibration is not supported with the standard xspec interface, but the users can find ways to do this by incorporating this aspect within the spectral model.