-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from DiamondLightSource/notebooks
Notebooks updates, GA token
- Loading branch information
Showing
13 changed files
with
574 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,11 @@ 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 <https://cupy.dev/>`_. Most of the | ||
methods migrated from `TomoPy <https://tomopy.readthedocs.io/en/stable/>`_ and `Savu <https://savu.readthedocs.io/en/latest/>`_ software packages. They have been | ||
optimised to ensure computational efficiency and high-throughput. | ||
methods migrated from `TomoPy <https://tomopy.readthedocs.io/en/stable/>`_ and `Savu <https://savu.readthedocs.io/en/latest/>`_ software packages. | ||
They have been optimised to ensure higher computational efficiency. | ||
|
||
Purpose of HTTomolibGPU | ||
======================= | ||
|
||
**HTTomolibGPU** can be used as a stand-alone library, but it has been specifically developed to | ||
work together with the `HTTomo <https://diamondlightsource.github.io/httomo/>`_ package. | ||
|
@@ -15,7 +18,7 @@ Install HTTomolibGPU as a pre-built conda Python package | |
.. code-block:: console | ||
$ conda create --name httomolibgpu # create a fresh conda environment | ||
$ conda install -c httomo httomolibgpu | ||
$ conda install httomo::httomolibgpu | ||
Setup the development environment: | ||
================================== | ||
|
@@ -25,32 +28,16 @@ Setup the development environment: | |
$ git clone [email protected]: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 | ||
$ pip install -e .[dev] # editable/development mode | ||
Build HTTomolibGPU as a conda Python package | ||
============================================= | ||
============================================ | ||
|
||
.. code-block:: console | ||
$ conda build conda/recipe/ -c conda-forge -c httomo -c astra-toolbox | ||
An example of using the API | ||
=========================== | ||
* The file :code:`examples/normalize-data.py` shows how to apply dark-flat field correction to the :code:`tests/test_data/tomo_standard.npz` data. | ||
* The file :code:`examples/fresnel-filter.py` shows how to apply Fresnel filtering to the :code:`tests/test_data/tomo_standard.npz` data. | ||
|
||
Input data for methods | ||
====================== | ||
$ conda build conda/recipe/ -c conda-forge -c httomo -c astra-toolbox -c rapidsai | ||
* We load the projection data from the file :code:`tests/test_data/tomo_standard.npz` using :code:`numpy.load`, which returns a dictionary-like object that can be indexed using the keys :code:`'data'` (to get :code:`host_data`), :code:`'flats'`, and :code:`'darks'`. | ||
* The dataset :code:`/data` in :code:`tests/test_data/normalized-projs.h5` is the input for methods in :code:`httomolibgpu.prep.stripe` | ||
* The dataset :code:`/data` in :code:`tests/test_data/removed-stripes.h5` is the input for methods in :code:`httomolibgpu.recon.rotation` | ||
|
||
Run tests | ||
Examples | ||
========= | ||
* Run all tests with :code:`$ pytest`. To increase verbosity, use :code:`$ pytest -v`. | ||
* Run GPU tests separately with :code:`$ pytest -v -m gpu`. | ||
* Run CPU tests separately with :code:`$ pytest -v -m "not gpu"`. | ||
* Run performance tests (only) with :code:`$ pytest --performance` | ||
(note that performance tests always fail - they report the execution time in an assertion | ||
to see them in the summary easily) | ||
|
||
There are series of Jupyter Notebooks located in :code:`examples/*` to demonstrate how some of the functions can be used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ python: | |
- 3.10 | ||
numpy: | ||
- 1.24 | ||
- 1.25 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters