HTTomolibGPU is a collection of image processing methods in Python for computed tomography. The methods are GPU-accelerated with the open-source Python library CuPy. Most of the methods migrated from TomoPy and Savu software packages. They have been optimised to ensure computational efficiency and high-throughput.
HTTomolibGPU can be used as a stand-alone library, but it has been specifically developed to work together with the HTTomo package. HTTomo is a user interface (UI) written in Python for fast big data processing using MPI protocols.
$ conda create --name httomolibgpu # create a fresh conda environment
$ conda install -c httomo httomolibgpu
$ git clone git@github.com:DiamondLightSource/httomolibgpu.git # clone the repo
$ conda env create --name httomolibgpu --file conda/environment.yml # install dependencies
$ conda activate httomolibgpu # activate the environment
$ pip install .[dev] # development mode
$ conda build conda/recipe/ -c conda-forge -c httomo -c astra-toolbox
- The file
examples/normalize-data.py
shows how to apply dark-flat field correction to thetests/test_data/tomo_standard.npz
data. - The file
examples/fresnel-filter.py
shows how to apply Fresnel filtering to thetests/test_data/tomo_standard.npz
data.
- We load the projection data from the file
tests/test_data/tomo_standard.npz
usingnumpy.load
, which returns a dictionary-like object that can be indexed using the keys'data'
(to gethost_data
),'flats'
, and'darks'
. - The dataset
/data
intests/test_data/normalized-projs.h5
is the input for methods inhttomolibgpu.prep.stripe
- The dataset
/data
intests/test_data/removed-stripes.h5
is the input for methods inhttomolibgpu.recon.rotation
- Run all tests with
$ pytest
. To increase verbosity, use$ pytest -v
. - Run GPU tests separately with
$ pytest -v -m gpu
. - Run CPU tests separately with
$ pytest -v -m "not gpu"
. - Run performance tests (only) with
$ pytest --performance
(note that performance tests always fail - they report the execution time in an assertion to see them in the summary easily)