The JAX-accelerated Universal Bayesian Imaging Kit is a python package for high-fidelity Bayesian imaging.
J-UBIK allows to image observations from different instruments with Bayesian posterior uncertainties and component separation. Next to many useful generic tools and building blocks, JUBIK comes with a series of sky models and instrument implementations, namely:
- Chandra
- eROSITA
- James Webb Space Telescope
This package can be installed via pip.
git clone https://github.com/NIFTy-PPL/J-UBIK
cd j-ubik
pip install --user .
for a regular installation. For editable installation add the -e flag.
- JAX
- astropy
- NIFTy (follow installation for NIFTy.re, the JAX implementation of NIFTy)
- ducc0
- matplotlib
For testing you need pytest to be installed. To run the tests execute the following from the j-ubik directory:
pytest-3 test/Tests considering Chandra are skipped if ciao is not installed.
Guidelines for contribuation can be found in CONTRIBUTING.md
Additional calibration files might be needed for instrument-specific pipelines.
J-UBIK allows to process observations from Chandra x-ray observatory.
- ciao >= 4.16
- marx
We recommend installation of both via conda / conda-forge ciao & marx
J-UBIK allows to process and image event files from the eROSITA x-ray observatory.
To process eROSITA observations or produce realistic synthetic data, you will need:
- eSASS, the eROSITA Science Analysis Software System. In particular, the current version of J-UBIK only supports using eSASS through the official docker container to ensure cross-compatibility.
- caldb folder, this allows to compute the eROSITA response accurately.
Either the caldb from data release 1 (DR1) or from the early data release (EDR) should be present
inside the
data/directory. This folder can be downloaded at caldb download. - Download the data if you want to work with public eROSITA data, see edr and dr1.
In the demo/ repository, erosita_inference.py allows to run a generic
image reconstruction with real and synthetic (mock) eROSITA data.
In order to run a mock demo, you will need to download both the calibration
folder as specified in the Requirements section and an actual observation,
in order to build realistic exposure maps.
A good example is LMC_dataset.
For more information on how to run erosita_demo.py see the corresponding docstring.
J-UBIK allows to process and image event files from the James Webb Space Telescope.
In order to make use of the JWST capabilities of the package, you will need to:
For more details see jwst_demo.py in the demo/ repository.
Alternatively, you can install these requirements via
pip install --user .[jwst]NOTE:
- Importing
jubiksets the floating point precision in jax tofloat64. - WebbPSF has shown some compatibility issues with the
numexprpackage.
The current version of the code has been tested successfully onnumexpr version==2.8.4.