Skip to content

A collection of the most commonly used tomography data processing methods at DLS

License

Notifications You must be signed in to change notification settings

namannimmo10/httomolibgpu

 
 

Repository files navigation

HTTomolibGPU is a library of GPU accelerated methods for tomography

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.

Install HTTomolibGPU as a pre-built conda Python package

$ conda env create --name httomolibgpu # create a fresh conda environment
$ conda install -c httomo httomolibgpu

Setup the development environment:

$ 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

Build HTTomolibGPU as a conda Python package

$ conda build conda/recipe/ -c conda-forge -c httomo -c astra-toolbox

An example of using the API

  • The file examples/normalize-data.py shows how to apply dark-flat field correction to the tests/test_data/tomo_standard.npz data.
  • The file examples/fresnel-filter.py shows how to apply Fresnel filtering to the tests/test_data/tomo_standard.npz data.

Input data for methods

  • We load the projection data from the file tests/test_data/tomo_standard.npz using numpy.load, which returns a dictionary-like object that can be indexed using the keys 'data' (to get host_data), 'flats', and 'darks'.
  • The dataset /data in tests/test_data/normalized-projs.h5 is the input for methods in httomolibgpu.prep.stripe
  • The dataset /data in tests/test_data/removed-stripes.h5 is the input for methods in httomolibgpu.recon.rotation

Run tests

  • 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)

About

A collection of the most commonly used tomography data processing methods at DLS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.6%
  • Cuda 10.7%
  • Shell 0.7%