Installation Guide#
ToMoBAR is a Python package with several Dependencies. To ensure its full functionality it is recommended to install them. It mostly relies on the GPU-enabled computations and therefore we suggest using a decent NVIDIA graphics card to support it.
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 (tested on Linux and Windows):
$ conda install -c httomo -c conda-forge tomophantom tomobar astra-toolbox ccpi-regulariser
In addition you can install pip install pypwt
if you are planning to use wavelet regularisation.
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, however, this approach suits best
if CuPy-enabled part of ToMoBAR (modules tomobar.methodsDIR_CuPy
and tomobar.methodsIR_CuPy
)
is mainly 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. With CuPy support and device-to-device transfer features, iterative nethods like FISTA can normally run several times faster.
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/test_RecToolsDIR.py tests/test_RecToolsIR.py
$ 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=2025.01 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 part of ToMoBAR is not currently maintained and will be deprecated in future releases. The code and demos were tested with Matlab 2018 and ASTRA-Toolbox version v1.8.3.