Skip to main content

fteikpy

License Stars Pyversions Version Downloads Code style: black Codacy Badge Codecov Build Docs DOI

fteikpy is a Python library that computes accurate first arrival traveltimes in 2D and 3D heterogeneous isotropic velocity models. The algorithm handles properly the curvature of wavefronts close to the source which can be placed without any problem between grid points.

The code is based on FTeik implemented in Python and compiled just-in-time with numba.

sample-marmousi

Computation of traveltimes and ray-tracing on smoothed Marmousi velocity model.

Features

Forward modeling:

  • Compute traveltimes in 2D and 3D Cartesian grids with the possibility to use a different grid spacing in Z, X and Y directions,

  • Compute traveltime gradients at runtime or a posteriori,

  • A posteriori 2D and 3D ray-tracing.

Parallel:

  • Traveltime grids are seemlessly computed in parallel for different sources,

  • Raypaths from a given source to different locations are also evaluated in parallel.

Installation

The recommended way to install fteikpy and all its dependencies is through the Python Package Index:

pip install fteikpy --user

Otherwise, clone and extract the package, then run from the package location:

pip install . --user

To test the integrity of the installed package, check out this repository and run:

pytest

Documentation

Refer to the online documentation for detailed description of the API and examples.

Alternatively, the documentation can be built using Sphinx:

pip install -r doc/requirements.txt
sphinx-build -b html doc/source doc/build

Usage

The following example computes the traveltime grid in a 3D homogeneous velocity model:

import numpy as np
from fteikpy import Eikonal3D

# Velocity model
velocity_model = np.ones((8, 8, 8))
dz, dx, dy = 1.0, 1.0, 1.0

# Solve Eikonal at source
eik = Eikonal3D(velocity_model, gridsize=(dz, dx, dy))
tt = eik.solve((0.0, 0.0, 0.0))

# Get traveltime at specific grid point
t1 = tt[0, 1, 2]

# Or get traveltime at any point in the grid
t2 = tt(np.random.rand(3) * 7.0)

Contributing

Please refer to the Contributing Guidelines to see how you can help. This project is released with a Code of Conduct which you agree to abide by when contributing.

Metadata

Release files for fteikpy 2.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fteikpy 2.4.0
File Size Uploaded
fteikpy-2.4.0.tar.gz 21.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fteikpy 2.4.0
File Interpreter ABI Platform
fteikpy-2.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.0 kB

Release files / fteikpy-2.4.0.tar.gz

Download URL fteikpy-2.4.0.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f934669ea6487cfcea1a2f9b72b6fad2f526ab62e395aee2805e527a5ad57146
BLAKE2b-256 checksum
How to use checksums
5f8caaa3f5cf335e4319b422e3e6e0177f3435c4dd140fa99a17c4a52680b985
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release files / fteikpy-2.4.0-py3-none-any.whl

Download URL fteikpy-2.4.0-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e0bad0ead35d9e76a20691a1b2e1b52f7af53b4adb4c75ed1ccc119b8191c88
BLAKE2b-256 checksum
How to use checksums
1af32b9dab616e9a22bc1c9ab08608165a93b96f8f5be211552f1c645a91b95b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release history Release notifications | RSS feed

This release

2.4.0 This release

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.5.0

1 release file

1.4.5

1 release file

1.4.4

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page