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.pyshows how to apply dark-flat field correction to thetests/test_data/tomo_standard.npzdata. - The file
examples/fresnel-filter.pyshows how to apply Fresnel filtering to thetests/test_data/tomo_standard.npzdata.
- We load the projection data from the file
tests/test_data/tomo_standard.npzusingnumpy.load, which returns a dictionary-like object that can be indexed using the keys'data'(to gethost_data),'flats', and'darks'. - The dataset
/dataintests/test_data/normalized-projs.h5is the input for methods inhttomolibgpu.prep.stripe - The dataset
/dataintests/test_data/removed-stripes.h5is 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)