solving the (factored) eikonal equation with the Fast Marching method
Project description
Eikonal Fast Marching
eikonalfm is a Python (C++) extension which implements the Fast Marching method for the eikonal equation
and the factored eikonal equation whereReferences
- J. Sethian. Fast marching methods. SIAM Review, 41(2):199-235, 1999. doi: 10.1137/S0036144598347059. URL https://doi.org/10.1137/S0036144598347059
- Eran Treister and Eldad Haber. A fast marching algorithm for the factored eikonal equation. Journal of Computational Physics, 324:210-225, 2016.
Requirements
- Python 3
- numpy version 1.7 or higher
- C++11 compiler
Installation
Installation from PyPi:
pip install eikonalfm
Manual install from the repository:
git clone https://github.com/kevinganster/eikonalfm.git
cd eikonalfm
python setup.py
Examples
import numpy as np
import eikonalfm
c = np.ones((100, 100))
x_s = (0, 0)
dx = (1.0, 1.0)
order = 2
tau_fm = eikonalfm.fast_marching(c, x_s, dx, order)
tau1_ffm = eikonalfm.factored_fast_marching(c, x_s, dx, order)
Note that the source position x_s
describes an index-vector.
To visualize the results, matplotlib (https://pypi.org/project/matplotlib/) can be used, for example:
import matplotlib.pyplot as plt
# for the distance-function 'x_s' describes real coordinates
tau0 = eikonalfm.distance(tau1_ffm.shape, dx, x_s)
plt.contourf(tau0 * tau1_ffm)
plt.show()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eikonalfm-0.9.5.tar.gz
(12.5 kB
view hashes)
Built Distribution
Close
Hashes for eikonalfm-0.9.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cdbc70c18649aa875c07af8ee9e844aca639ffc06e61fbc3b3c776cf5895a24 |
|
MD5 | d36ae4e7f50e3ace9d293d70975c4f90 |
|
BLAKE2b-256 | 42562f88c2bc12a70a884f6c8fe848be861d6271c8cbd76f91879bae8d48ff64 |