Skip to content

TauFactor is a parallelised solver for calculating tortuosity factors from voxel data.

License

Notifications You must be signed in to change notification settings

tldr-group/taufactor

Repository files navigation

PyPI ReadTheDocs PyUp MIT LICENSE

TauFactor

TauFactor is an application for calculating tortuosity factors from tomographic data. TauFactor uses CuPy_ which is an implementation of NumPy-compatible multi-dimensional array on CUDA.

Requirements

You will need an NVIDIA GPU to use this distribution of taufactor.
Before installing taufactor, download the most recent version of CuPy: https://docs.cupy.dev/en/stable/install.html

Usage

A basic example for taufactor:

import taufactor as tau

# load image
img = tifffile.imread('path/filename')
# ensure 1s for conductive phase and 0s otherwise.
# here we perform an example segmentation on a grayscale img
img[img > 0.7] = 1
img[img != 1] = 0
# create a solver object
s = tau.Solver(img)
# call solve function
D_rel = s.solve()

We can also use the periodic solver

import taufactor as tau

# create a periodic solver object and set an iteration limit
s = tau.PeriodicSolver(img, iter_limit=1000)
# call solve function
D_rel = s.solve()

Credits

This package was created with Cookiecutter_ and the audreyr/cookiecutter-pypackage_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _audreyr/cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage