Installation Guide#

ToMoBAR is a Python package with several Dependencies. To enable full functionality, it is recommended to install a subset of these dependencies.

Note

ToMoBAR relies on GPU-accelerated computations; therefore, we also recommend using a capable NVIDIA graphics card to take full advantage of its features.

Python#

Install ToMoBAR as a pre-built Python package:#

Minimal installation as a conda pre-built package:

$ conda install -c httomo tomobar

or install with the dependencies into a new environment:

$ conda install -c httomo -c conda-forge tomophantom tomobar astra-toolbox

Conda environment + pip install:#

One can also create a new conda environment by using provided environment YAML file, and then pip install ToMoBAR into the environment.

$ git clone git@github.com/dkazanc/ToMoBAR.git # clone the repo
$ conda env create --name tomobar --file conda-recipe/environment/environment.yml
$ conda activate tomobar
$ pip install .

Install ToMoBAR from PyPi:#

One can install ToMoBAR from PyPi into venv or conda` environments. It is the quickest way when CuPy-enabled part of ToMoBAR (modules tomobar.methodsDIR_CuPy and tomobar.methodsIR_CuPy) is used.

$ python -m venv tomobar
$ source tomobar/bin/activate
$ pip install tomobar # one can also install into conda environment

Note

CuPy-enabled ToMoBAR is currently actively developed.

Developers environment#

This sets the development environment to work in-place on the code.

$ git clone git@github.com/dkazanc/ToMoBAR.git # clone the repo
$ conda env create --name tomobar --file conda-recipe/environment/environment.yml
$ conda activate tomobar
$ pip install -e .[dev] # the editable environment
$ pytest tests/ # you'll need CuPy to run those tests

Conda build#

If one needs to conda-build the package, please follow the steps bellow:

$ export VERSION=$(date +%Y.%m) # OR set VERSION=2026.3.0.0 for Windows
$ git clone git@github.com/dkazanc/ToMoBAR.git # clone the repo
$ conda build conda-recipe/
$ conda install path/to/the/tarball

Matlab#

Warning

Matlab’s scripts of ToMoBAR can be found prior to 2026.3.0.0 release.