Skip to main content

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



  • J. Sethian. Fast marching methods. SIAM Review, 41(2):199-235, 1999. doi: 10.1137/S0036144598347059. URL
  • Eran Treister and Eldad Haber. A fast marching algorithm for the factored eikonal equation. Journal of Computational Physics, 324:210-225, 2016.


  • Python 3
  • numpy version 1.7 or higher
  • C++11 compiler


Installation from PyPi:

pip install eikonalfm

Manual install from the repository:

git clone
cd eikonalfm


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)
tau_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 ( can be used, for example:

import matplotlib.pyplot as plt


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for eikonalfm, version 0.9.1
Filename, size File type Python version Upload date Hashes
Filename, size eikonalfm-0.9.1-cp37-cp37m-win_amd64.whl (18.7 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size eikonalfm-0.9.1.tar.gz (11.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page