Intended to simplify experimentation and comparison of different algorithms for solving the eikonal equation in 2D and 3D.
FMM implemented in numpy. FIM implemented in numpyand torch.
See doc/examples and test for example usage.
The python overhead for FMM is quite large, so if you need something fast with a python interface have a look at https://github.com/scikit-fmm/scikit-fmm
- Fast Marching Method (FMM)
- Fast Iterative Method (FIM), really the Improved Fast Iterative Method
pyproject.toml: Project configuration (build, test, lint)setup.cfg: More project configuration (package info, dependencies). Most importantly the package name which needs to match the namespace hiearchy.setup.py: Auto-generated to allow builds assumingsetup.pyexistence.tox.ini: Configuration fortox, see https://tox.readthedocs.io/en/latest/examples.htmlMANIFEST.in: Include extra files in distribution, see https://packaging.python.org/guides/using-manifest-in/
We use pypa-build
python -m build
This will create a wheel and a tar ball in the directory dist, either of which can be distributed and installed using pip. To install from the dist dir
pip install eikonal_solvers -f dist
pytest for running tests and tox for automating the testing.
Configuration for pytest is in pyproject.toml. Some tests are slow and can be disabled by removing --runslow from the addopts variable. Some tests generate images that by default are stored in test/out. Alternative directory can be specified in the addopts variable with --outdir=<path-to-directory>.
Configuration for tox is in tox.ini.
Tests are run by executing tox without parameters from the root of the repository.
There are some benchmarks in the test directory for comparing seqeuential/parallel FIM, and for comparing first/second order FMM. These can be run directly from the test dir.
After building the package, install development dependencies with
pip install <path-to-wheel>[dev]
We use pylint to do static check and enforce coding standards. Configuration is in pyproject.toml. To run do
pylint src/eikonal_solvers
and either fix the issues or explicitly ignore them. See the documentation for details on controling linting, including which naming convention to enforce.